Skip to content

Commit

Permalink
Update commands/scan/scan.go
Browse files Browse the repository at this point in the history
Co-authored-by: Assaf Attias <[email protected]>
  • Loading branch information
guyshe-jfrog and attiasas authored May 30, 2024
1 parent 6bff0b9 commit 9090dd7
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions commands/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,17 +400,11 @@ func (scanCmd *ScanCommand) createIndexerHandlerFunc(file *spec.File, entitledFo
return
}

// flatResults := []xrutils.ScaScanResult{}
extendedScanResults := utils.ExtendedScanResults{}
if entitledForJas && scanCmd.commandSupportsJAS {
depsList := depsListFromVulnerabilities(*scanResults)

// for _, scanResult := range scanResults {
// scanResults.ScaResults = append(scanResults.ScaResults, scanResult)
// }

workingDirs := []string{scanCmd.spec.Files[0].Pattern}
err = runner.RunJasScannersAndSetResults(&extendedScanResults, []coreutils.Technology{coreutils.Technology(scanResults.ScannedPackageType)}, []services.ScanResponse{*scanResults}, depsList, scanCmd.serverDetails, workingDirs, nil, false, "", applicability.ApplicabilityDockerScanScanType, secrets.SecretsScannerDockerScanType)
// Run Jas scans
workingDirs := []string{filePath}
err = runner.RunJasScannersAndSetResults(&extendedScanResults, []coreutils.Technology{coreutils.Technology(scanResults.ScannedPackageType)}, []services.ScanResponse{*scanResults}, depsListFromVulnerabilities(*scanResults), scanCmd.serverDetails, workingDirs, nil, false, "", applicability.ApplicabilityDockerScanScanType, secrets.SecretsScannerDockerScanType)

if err != nil {
log.Error(fmt.Sprintf("scanning '%s' failed with error: %s", graph.Id, err.Error()))
Expand Down

0 comments on commit 9090dd7

Please sign in to comment.