Updated RuleId in Sarif (#613)

This commit is contained in:
rotem-cider authored and GitHub committed 2021-09-02 09:34:45 -05:00
1 parent aa91fd3e5e
commit 127df8a6f0
1 file changed
+2
+2
View File
@@ -77,6 +77,7 @@ type Locations struct {
//Results ... //Results ...
type Results struct { type Results struct {
Message Message `json:"message"` Message Message `json:"message"`
RuleId string `json:"ruleId"`
Properties ResultProperties `json:"properties"` Properties ResultProperties `json:"properties"`
Locations []Locations `json:"locations"` Locations []Locations `json:"locations"`
} }
@@ -117,6 +118,7 @@ func leaksToResults(leaks []Leak) []Results {
Message: Message{ Message: Message{
Text: fmt.Sprintf("%s secret detected", leak.Rule), Text: fmt.Sprintf("%s secret detected", leak.Rule),
}, },
RuleId: leak.Rule,
Properties: ResultProperties{ Properties: ResultProperties{
Commit: leak.Commit, Commit: leak.Commit,
Offender: leak.Offender, Offender: leak.Offender,