Skip to content

Commit e2b5b58

Browse files
fix: resultId in sarif
1 parent f606f03 commit e2b5b58

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/reporting/report_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ var (
136136
Properties: Properties{
137137
"validationStatus": string(result1.ValidationStatus),
138138
"cvssScore": result1.CvssScore,
139+
"resultId": result1.ID,
139140
},
140141
}
141142
result2Sarif = Results{
@@ -167,6 +168,7 @@ var (
167168
Properties: Properties{
168169
"validationStatus": string(result2.ValidationStatus),
169170
"cvssScore": result2.CvssScore,
171+
"resultId": result2.ID,
170172
},
171173
}
172174
result3Sarif = Results{
@@ -198,6 +200,7 @@ var (
198200
Properties: Properties{
199201
"validationStatus": string(result3.ValidationStatus),
200202
"cvssScore": result3.CvssScore,
203+
"resultId": result3.ID,
201204
},
202205
}
203206
result4Sarif = Results{
@@ -230,6 +233,7 @@ var (
230233
"validationStatus": string(result4.ValidationStatus),
231234
"cvssScore": result4.CvssScore,
232235
"confluence.pageId": result4.ExtraDetails["confluence.pageId"],
236+
"resultId": result4.ID,
233237
},
234238
}
235239
)

lib/reporting/sarif.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func getResults(report *Report) []Results {
9494
props := Properties{
9595
"validationStatus": secret.ValidationStatus,
9696
"cvssScore": secret.CvssScore,
97+
"resultId": secret.ID,
9798
}
9899

99100
if secret.ExtraDetails != nil {

0 commit comments

Comments
 (0)