From 127df8a6f0fe523b3257b2ebc93b2896cca848d5 Mon Sep 17 00:00:00 2001 From: rotem-cider <78903577+rotem-cider@users.noreply.github.com> Date: Thu, 2 Sep 2021 17:34:45 +0300 Subject: [PATCH] Updated RuleId in Sarif (#613) --- scan/sarif.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scan/sarif.go b/scan/sarif.go index e58b5f23..15b83f06 100644 --- a/scan/sarif.go +++ b/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,