diff --git a/internal/commands/result.go b/internal/commands/result.go index b3e64be6f..dac7abb9b 100644 --- a/internal/commands/result.go +++ b/internal/commands/result.go @@ -2704,6 +2704,8 @@ func parseSarifResultsSscs(result *wrappers.ScanResult, scanResults []wrappers.S var properties wrappers.SarifResultProperties properties.Severity = result.Severity properties.Validity = result.ScanResultData.Validity + properties.IsInSource = result.ScanResultData.IsInSource + properties.CommitURL = result.ScanResultData.CommitURL scanResult.Properties = &properties scanResults = append(scanResults, scanResult) diff --git a/internal/wrappers/results-json.go b/internal/wrappers/results-json.go index 88072f78f..a2a5b3f2c 100644 --- a/internal/wrappers/results-json.go +++ b/internal/wrappers/results-json.go @@ -127,4 +127,6 @@ type ScanResultData struct { RemediationLink string `json:"remediationLink,omitempty"` RemediationAdditional string `json:"remediationAdditional,omitempty"` Validity string `json:"validity,omitempty"` + IsInSource bool `json:"isInSource,omitempty"` + CommitURL string `json:"commitUrl,omitempty"` } diff --git a/internal/wrappers/results-sarif.go b/internal/wrappers/results-sarif.go index a153e3186..93e4ff3b4 100644 --- a/internal/wrappers/results-sarif.go +++ b/internal/wrappers/results-sarif.go @@ -96,6 +96,8 @@ type SarifResultFingerprint struct { } type SarifResultProperties struct { - Severity string `json:"severity,omitempty"` - Validity string `json:"validity,omitempty"` + Severity string `json:"severity,omitempty"` + Validity string `json:"validity,omitempty"` + IsInSource bool `json:"isInSource,omitempty"` + CommitURL string `json:"commitUrl,omitempty"` }