Skip to content

Commit 3cdee94

Browse files
improve sarif
1 parent 14658d7 commit 3cdee94

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

utils/sarif.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,18 @@ type Driver struct {
4343
}
4444

4545
type Rule struct {
46-
ID string `json:"id"`
47-
ShortDescription MessageText `json:"shortDescription"`
48-
Properties map[string]interface{} `json:"properties"`
46+
ID string `json:"id"`
47+
ShortDescription MessageText `json:"shortDescription"`
48+
Properties RuleProperties `json:"properties"`
49+
}
50+
51+
type RuleProperties struct {
52+
Priority int `json:"priority,omitempty"`
53+
Ruleset string `json:"ruleset,omitempty"`
54+
Tags []string `json:"tags,omitempty"`
55+
// Add other common properties that might be present
56+
Precision string `json:"precision,omitempty"`
57+
SecuritySeverity string `json:"security-severity,omitempty"`
4958
}
5059

5160
type Result struct {

0 commit comments

Comments
 (0)