mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
Updated RuleId in Sarif (#613)
This commit is contained in:
1 parent
aa91fd3e5e
commit
127df8a6f0
1 file changed
+2
@@ -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,
|
||||||
|
|||||||
Reference in new issue
Block a user