Skip to content

Commit

Permalink
Added properties to sarif results. Added validationStatus to results …
Browse files Browse the repository at this point in the history
…properties
  • Loading branch information
diogo-fjrocha committed Apr 19, 2024
1 parent 382b52a commit 0d8f7f5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/reporting/sarif.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func getResults(report Report) []Results {
},
RuleId: secret.RuleID,
Locations: getLocation(secret),
Properties: Properties{
"validationStatus": secret.ValidationStatus,
},
}
results = append(results, r)
}
Expand Down Expand Up @@ -144,12 +147,15 @@ type Locations struct {
}

type Results struct {
Message Message `json:"message"`
RuleId string `json:"ruleId"`
Locations []Locations `json:"locations"`
Message Message `json:"message"`
RuleId string `json:"ruleId"`
Locations []Locations `json:"locations"`
Properties Properties `json:"properties,omitempty"`
}

type Runs struct {
Tool Tool `json:"tool"`
Results []Results `json:"results"`
}

type Properties map[string]interface{}

0 comments on commit 0d8f7f5

Please sign in to comment.