Skip to content

Commit

Permalink
Remove progress for now, it hangs in the cli jfrog#1035
Browse files Browse the repository at this point in the history
  • Loading branch information
guyshe-jfrog committed Jan 8, 2024
1 parent 5a2c23e commit 8dff639
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions xray/commands/scan/jasrunner_cves.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion xray/commands/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 8dff639

Please sign in to comment.