From ecc791f8fc19d09c8465d72da4d1ace5eda5ff2d Mon Sep 17 00:00:00 2001 From: Assaf Attias <49212512+attiasas@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:38:57 +0200 Subject: [PATCH] No MSI No XSC (#1050) --- xray/services/scan.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xray/services/scan.go b/xray/services/scan.go index 0b33e2518..8c2a192a5 100644 --- a/xray/services/scan.go +++ b/xray/services/scan.go @@ -76,7 +76,7 @@ func createScanGraphQueryParams(scanParams XrayGraphScanParams) string { } } - if scanParams.XscVersion != "" { + if scanParams.XscVersion != "" && scanParams.MultiScanId != "" { params = append(params, multiScanIdParam+scanParams.MultiScanId) gitInfoContext := scanParams.XscGitInfoContext if gitInfoContext != nil { @@ -112,8 +112,8 @@ func (ss *ScanService) ScanGraph(scanParams XrayGraphScanParams) (string, error) } url := ss.XrayDetails.GetUrl() + scanGraphAPI - // When XSC is enabled, modify the URL. - if scanParams.XrayVersion != "" && scanParams.XscVersion != "" { + // When XSC is enabled and MultiScanId is provided, modify the URL to use XSC scan graph (analytics enabled) + if scanParams.XrayVersion != "" && scanParams.XscVersion != "" && scanParams.MultiScanId != "" { url = utils.XrayUrlToXscUrl(ss.XrayDetails.GetUrl(), scanParams.XrayVersion) + XscGraphAPI } url += createScanGraphQueryParams(scanParams)