From 8dff6394b8af8e088ef57536443070b1e87ec60d Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Wed, 29 Nov 2023 18:25:49 +0200 Subject: [PATCH] Remove progress for now, it hangs in the cli #1035 --- xray/commands/scan/jasrunner_cves.go | 10 +--------- xray/commands/scan/scan.go | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/xray/commands/scan/jasrunner_cves.go b/xray/commands/scan/jasrunner_cves.go index f8a60c742..f5a38b5c0 100644 --- a/xray/commands/scan/jasrunner_cves.go +++ b/xray/commands/scan/jasrunner_cves.go @@ -10,12 +10,11 @@ import ( "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit/jas/secrets" "github.com/jfrog/jfrog-cli-core/v2/xray/utils" - "github.com/jfrog/jfrog-client-go/utils/io" "github.com/jfrog/jfrog-client-go/utils/log" ) func runJasScannersAndSetResults(scanResults *utils.Results, cveList []string, - serverDetails *config.ServerDetails, workingDirs []string, progress io.ProgressMgr, multiScanId string, thirdPartyApplicabilityScan bool) (err error) { + serverDetails *config.ServerDetails, workingDirs []string, multiScanId string, thirdPartyApplicabilityScan bool) (err error) { if serverDetails == nil || len(serverDetails.Url) == 0 { log.Warn("To include 'Advanced Security' scan as part of the audit output, please run the 'jf c add' command before running this command.") @@ -32,19 +31,12 @@ func runJasScannersAndSetResults(scanResults *utils.Results, cveList []string, err = errors.Join(err, cleanup()) }() - // if progress != nil { - // progress.SetHeadlineMsg("Running applicability scanning") - // } - scanResults.ExtendedScanResults.ApplicabilityScanResults, err = applicability.RunApplicabilityWithScanCves(scanResults.GetScaScansXrayResults(), cveList, scanResults.GetScaScannedTechnologies(), scanner, thirdPartyApplicabilityScan) if err != nil { fmt.Println("there was an error:", err) return } - // if progress != nil { - // progress.SetHeadlineMsg("Running secrets scanning") - // } scanResults.ExtendedScanResults.SecretsScanResults, err = secrets.RunSecretsScan(scanner, secrets.SecretsScannerDockerType) if err != nil { return diff --git a/xray/commands/scan/scan.go b/xray/commands/scan/scan.go index 383798028..0a84fa2de 100644 --- a/xray/commands/scan/scan.go +++ b/xray/commands/scan/scan.go @@ -268,7 +268,7 @@ func (scanCmd *ScanCommand) Run() (err error) { multiScanId := "" // Also empty for audit thirdPartyApplicabilityScan := false workingDirs := []string{(*scanCmd).spec.Files[0].Pattern} - scanResults.JasError = runJasScannersAndSetResults(scanResults, cveList, scanCmd.serverDetails, workingDirs, scanCmd.progress, multiScanId, thirdPartyApplicabilityScan) + scanResults.JasError = runJasScannersAndSetResults(scanResults, cveList, scanCmd.serverDetails, workingDirs, multiScanId, thirdPartyApplicabilityScan) } if err = xrutils.NewResultsWriter(scanResults).