diff --git a/xray/commands/audit/jas/applicability/applicabilitymanager.go b/xray/commands/audit/jas/applicability/applicabilitymanager.go index b7583818d..41266c449 100644 --- a/xray/commands/audit/jas/applicability/applicabilitymanager.go +++ b/xray/commands/audit/jas/applicability/applicabilitymanager.go @@ -67,8 +67,8 @@ func RunApplicabilityScan(xrayResults []services.ScanResponse, directDependencie // bool: true if the user is entitled to the applicability scan, false otherwise. // error: An error object (if any). func RunApplicabilityWithScanCves(xrayResults []services.ScanResponse, cveList []string, - scannedTechnologies []coreutils.Technology, scanner *jas.JasScanner, thirdPartyContextualAnalysis bool) (results []*sarif.Run, err error) { - applicabilityScanManager := newApplicabilityScanManagerCves(xrayResults, cveList, scanner, thirdPartyContextualAnalysis) + scannedTechnologies []coreutils.Technology, scanner *jas.JasScanner) (results []*sarif.Run, err error) { + applicabilityScanManager := newApplicabilityScanManagerCves(xrayResults, cveList, scanner) if err = applicabilityScanManager.scanner.Run(applicabilityScanManager); err != nil { err = utils.ParseAnalyzerManagerError(utils.Applicability, err) return @@ -77,13 +77,13 @@ func RunApplicabilityWithScanCves(xrayResults []services.ScanResponse, cveList [ return } -func newApplicabilityScanManagerCves(xrayScanResults []services.ScanResponse, cveList []string, scanner *jas.JasScanner, thirdPartyScan bool) (manager *ApplicabilityScanManager) { +func newApplicabilityScanManagerCves(xrayScanResults []services.ScanResponse, cveList []string, scanner *jas.JasScanner) (manager *ApplicabilityScanManager) { return &ApplicabilityScanManager{ applicabilityScanResults: []*sarif.Run{}, directDependenciesCves: cveList, xrayResults: xrayScanResults, scanner: scanner, - thirdPartyScan: thirdPartyScan, + thirdPartyScan: false, commandType: applicabilityDockerScanScanType, } } diff --git a/xray/commands/scan/jasrunner_cves.go b/xray/commands/scan/jasrunner_cves.go index f5a38b5c0..df539af39 100644 --- a/xray/commands/scan/jasrunner_cves.go +++ b/xray/commands/scan/jasrunner_cves.go @@ -14,13 +14,13 @@ import ( ) func runJasScannersAndSetResults(scanResults *utils.Results, cveList []string, - serverDetails *config.ServerDetails, workingDirs []string, multiScanId string, thirdPartyApplicabilityScan bool) (err error) { + serverDetails *config.ServerDetails, workingDirs []string) (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.") return } - + multiScanId := "" // Also empty for audit scanner, err := jas.NewJasScanner(workingDirs, serverDetails, multiScanId) if err != nil { return @@ -31,7 +31,7 @@ func runJasScannersAndSetResults(scanResults *utils.Results, cveList []string, err = errors.Join(err, cleanup()) }() - scanResults.ExtendedScanResults.ApplicabilityScanResults, err = applicability.RunApplicabilityWithScanCves(scanResults.GetScaScansXrayResults(), cveList, scanResults.GetScaScannedTechnologies(), scanner, thirdPartyApplicabilityScan) + scanResults.ExtendedScanResults.ApplicabilityScanResults, err = applicability.RunApplicabilityWithScanCves(scanResults.GetScaScansXrayResults(), cveList, scanResults.GetScaScannedTechnologies(), scanner) if err != nil { fmt.Println("there was an error:", err) return diff --git a/xray/commands/scan/scan.go b/xray/commands/scan/scan.go index 01a10960b..79cdafdc0 100644 --- a/xray/commands/scan/scan.go +++ b/xray/commands/scan/scan.go @@ -264,10 +264,8 @@ func (scanCmd *ScanCommand) Run() (err error) { if scanResults.ExtendedScanResults.EntitledForJas { cveList := cveListFromVulnerabilities(flatResults) - multiScanId := "" // Also empty for audit - thirdPartyApplicabilityScan := false workingDirs := []string{scanCmd.spec.Files[0].Pattern} - scanResults.JasError = runJasScannersAndSetResults(scanResults, cveList, scanCmd.serverDetails, workingDirs, multiScanId, thirdPartyApplicabilityScan) + scanResults.JasError = runJasScannersAndSetResults(scanResults, cveList, scanCmd.serverDetails, workingDirs) } if err = xrutils.NewResultsWriter(scanResults).