Browse Source

Updated RuleId in Sarif (#613)

rotem-cider 4 năm trước cách đây
mục cha
commit
127df8a6f0
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      scan/sarif.go

+ 2 - 0
scan/sarif.go

@@ -77,6 +77,7 @@ type Locations struct {
 //Results ...
 type Results struct {
 	Message    Message          `json:"message"`
+	RuleId     string           `json:"ruleId"`
 	Properties ResultProperties `json:"properties"`
 	Locations  []Locations      `json:"locations"`
 }
@@ -117,6 +118,7 @@ func leaksToResults(leaks []Leak) []Results {
 			Message: Message{
 				Text: fmt.Sprintf("%s secret detected", leak.Rule),
 			},
+			RuleId: leak.Rule,
 			Properties: ResultProperties{
 				Commit:        leak.Commit,
 				Offender:      leak.Offender,