Skip to content

Commit

Permalink
use new on other scan results
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Oct 24, 2023
1 parent 09b8e91 commit 8ca6ad7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion xray/commands/scan/buildscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ func (bsc *BuildScanCommand) runBuildScanAndPrintResults(xrayManager *xray.XrayS
XrayDataUrl: buildScanResults.MoreDetailsUrl,
}}

scanResults := &xrutils.Results{ScaResults: []xrutils.ScaScanResult{{XrayResults: scanResponse}}, XrayVersion: xrayVersion}
scanResults := xrutils.NewAuditResults()
scanResults.XrayVersion = xrayVersion
scanResults.ScaResults = []xrutils.ScaScanResult{{XrayResults: scanResponse}}

resultsPrinter := xrutils.NewResultsWriter(scanResults).
SetOutputFormat(bsc.outputFormat).
Expand Down
4 changes: 3 additions & 1 deletion xray/commands/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ func (scanCmd *ScanCommand) Run() (err error) {
scanErrors = appendErrorSlice(scanErrors, fileProducerErrors)
scanErrors = appendErrorSlice(scanErrors, indexedFileProducerErrors)

scanResults := &xrutils.Results{ScaResults: []xrutils.ScaScanResult{{XrayResults: flatResults}}, XrayVersion: xrayVersion}
scanResults := xrutils.NewAuditResults()
scanResults.XrayVersion = xrayVersion
scanResults.ScaResults = []xrutils.ScaScanResult{{XrayResults: flatResults}}

if err = xrutils.NewResultsWriter(scanResults).
SetOutputFormat(scanCmd.outputFormat).
Expand Down

0 comments on commit 8ca6ad7

Please sign in to comment.