Raw 데이터

pipelineName: string;
stage: string;
tool: string;

@Prop({ default: now() })
createdAt: Date;

@Prop({ default: now() })
updatedAt: Date;

data: []

CWE table

cweId: string
cveIds: []
cvssv2: string // 최소한 둘중에 하나는 구해줘야함
cvssv3: string // 최소한 둘중에 하나는 구해줘야함
"Frequency": int NVDCount based,
@Prop({ default: now() })
createdAt: Date;

@Prop({ default: now() })
updatedAt: Date;

⇒ 근데 ZAP은 CWE가 693으로 동일한데, risk 점수가 다른 경우가 있음

weights table

"cvssWeights": int, (default = 1)
"frequencyWeights": int, (default = 1)
"toolWeights": int (default = 1)

New format(우리 논문을 기준으로 작성됨)

// raw ObjectId()
pipelineName: string;
stage: string;
tool: string;

// new format이 생성된 시간
@Prop({ default: now() })
createdAt: Date;

@Prop({ default: now() })
updatedAt: Date;

rawCreatedAt: Date; // Raw 데이터가 생성된 시간

data:
[
	{
		"message":string, // 한줄 요약
		"uri":string, // 파일 위치, 경로
		"startLine":string, 
		"toolSeverity": string, // "3.4" 이런거(tool 기준)
		"toolProblemSeverity": string, // "error" 이런거(tool 기준)
		"toolPrecision": string, //high 이런거(tool 기준)
		"toolReference": string, // codeql 사이트, zap 사이트 등
		"toolOtherReference": [
			{ "url": string },
			{ "url": string },
		]
		"desription": string, //자세한 설명

		"cweId": string, //objectId 이용
		// "level":string, // cvss를 기준으로 재편성(raw와 다름)
		"cvssv2": string, // "8.9" 이런거
		"cvssv3": string, // "8.9" 이런거(둘다 있는 경우 v3우선)		
		"cveIds": [] // cwe table 가져오기
		"Frequency": int NVDCount based,
		"defaultScore": int S = {C * P * W(1) + F * W(1)} * W(1)
		"userScore": int (default = defaultScore)
	}
]

BiBiM format

pipelineName: string;
stage: string;
tool: string;
createdAt: Date;
updatedAt: Date;
rawCreatedAt: Date;

data:
[
	{
		"message":string,
		"uri":string,
		"startLine":string, 
		"toolSeverity": string,
		"toolProblemSeverity": string,
		"toolPrecision": string,
		"toolReference": string,
		"toolOtherReference": [
			{ "url": string },
			{ "url": string },
		],
		"desription": string,
		"cweId": string,
		"cvssv2": string,
		"cvssv3": string,	
		"cveIds": [],
		"Frequency": int NVDCount based,
		"defaultScore": int S = {C * P * W(1) + F * W(1)} * W(1)
		"userScore": int (default = defaultScore)
	}
]