diff --git a/xray/commands/scan/scan.go b/xray/commands/scan/scan.go index f3c8c3d0d..944266c3d 100644 --- a/xray/commands/scan/scan.go +++ b/xray/commands/scan/scan.go @@ -284,17 +284,6 @@ func (scanCmd *ScanCommand) binaryScan() (extendedScanResults *xrutils.ExtendedS scanErrors = appendErrorSlice(scanErrors, indexedFileProducerErrors) extendedScanResults = &xrutils.ExtendedScanResults{XrayResults: flatResults} - if err = xrutils.NewResultsWriter(extendedScanResults). - SetOutputFormat(scanCmd.outputFormat). - SetIncludeVulnerabilities(scanCmd.includeVulnerabilities). - SetIncludeLicenses(scanCmd.includeLicenses). - SetPrintExtendedTable(scanCmd.printExtendedTable). - SetIsMultipleRootProject(true). - SetScanType(services.Binary). - PrintScanResults(); err != nil { - return - } - // If includeVulnerabilities is false it means that context was provided, so we need to check for build violations. // If user provided --fail=false, don't fail the build. if scanCmd.fail && !scanCmd.includeVulnerabilities { diff --git a/xray/formats/conversion.go b/xray/formats/conversion.go index 31baa9783..73418b94d 100644 --- a/xray/formats/conversion.go +++ b/xray/formats/conversion.go @@ -67,7 +67,7 @@ func ConvertToVulnerabilityDockerScanTableRow(rows []VulnerabilityOrViolationRow ImpactedPackageType: rows[i].ImpactedDependencyType, fixedVersions: fixedVersionsFallback(rows[i].FixedVersions), cves: convertToShortCveTableRow(rows[i].Cves), - dockerfileCommand: dockerCommand.Command, + dockerCommand: dockerCommand.Command, dockerfileLine: strings.Join(dockerCommand.Line, ","), }) } diff --git a/xray/formats/table.go b/xray/formats/table.go index 71f30e988..41a179140 100644 --- a/xray/formats/table.go +++ b/xray/formats/table.go @@ -36,12 +36,12 @@ type vulnerabilityDockerScanTableRow struct { severity string `col-name:"Severity"` // For sorting severityNumValue int + dockerCommand string `col-name:"Command\n"` impactedPackageName string `col-name:"Impacted\nPackage\nName"` impactedPackageVersion string `col-name:"Impacted\nPackage\nVersion"` fixedVersions string `col-name:"Fixed\nVersions"` ImpactedPackageType string `col-name:"Type"` dockerfileLine string `col-name:"Dockerfile\nLine Number\n" extended:"true"` - dockerfileCommand string `col-name:"Dockerfile\nCommand\n" ` cves []cveShortTableRow `embed-table:"true"` }