Skip to content

Commit

Permalink
Fix static check
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Sep 14, 2023
1 parent 54da48c commit e03fbf6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xray/utils/resultwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (rw *ResultsWriter) generateSarifContentFromResults(markdownOutput bool) (s
if err != nil {
return
}
xrayRun, err := rw.convertXrayResponsesToSarifRun(rw.results, rw.isMultipleRoots, rw.includeLicenses, markdownOutput)
xrayRun, err := rw.convertXrayResponsesToSarifRun(markdownOutput)
if err != nil {
return
}
Expand All @@ -196,13 +196,13 @@ func (rw *ResultsWriter) generateSarifContentFromResults(markdownOutput bool) (s
return clientUtils.IndentJson(out), nil
}

func (rw *ResultsWriter) convertXrayResponsesToSarifRun(extendedResults *ExtendedScanResults, isMultipleRoots, includeLicenses, markdownOutput bool) (run *sarif.Run, err error) {
func (rw *ResultsWriter) convertXrayResponsesToSarifRun(markdownOutput bool) (run *sarif.Run, err error) {
xrayJson, err := rw.convertXrayScanToSimpleJson(true)
if err != nil {
return
}
xrayRun := sarif.NewRunWithInformationURI("JFrog Xray Sca", "https://jfrog.com/xray/")
xrayRun.Tool.Driver.Version = &extendedResults.XrayVersion
xrayRun.Tool.Driver.Version = &rw.results.XrayVersion
if len(xrayJson.Vulnerabilities) > 0 || len(xrayJson.SecurityViolations) > 0 {
if err = extractXrayIssuesToSarifRun(xrayRun, xrayJson, markdownOutput); err != nil {
return
Expand Down

0 comments on commit e03fbf6

Please sign in to comment.