From 58b7b7f50af1dbbfeb62997302afcf2bed45f936 Mon Sep 17 00:00:00 2001 From: delarea Date: Sun, 20 Aug 2023 20:01:14 +0300 Subject: [PATCH] Fix date & multi scan on get --- xray/scan/scan.go | 4 ++-- xray/scan/xscScan.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xray/scan/scan.go b/xray/scan/scan.go index 11791f662..3502d4850 100644 --- a/xray/scan/scan.go +++ b/xray/scan/scan.go @@ -18,7 +18,7 @@ import ( ) const ( - scanGraphAPI = "api/v1/scan/graph" + scanGraphAPI = "api/v1/sca/scan/graph" // Graph scan query params repoPathQueryParam = "repo_path=" @@ -338,5 +338,5 @@ type XscGitInfoContext struct { CommitHash string `json:"commit_hash"` CommitMessage string `json:"commit_message"` CommitAuthor string `json:"commit_author"` - Date int64 `json:"date"` + Date string `json:"date"` } diff --git a/xray/scan/xscScan.go b/xray/scan/xscScan.go index 3770444cd..1a6f24a80 100644 --- a/xray/scan/xscScan.go +++ b/xray/scan/xscScan.go @@ -98,7 +98,8 @@ func (xsc *XscScanService) GetScanGraphResults(scanId string, includeVulnerabili utils.SetContentType("application/json", &httpClientsDetails.Headers) // The scan request may take some time to complete. We expect to receive a 202 response, until the completion. - endPoint := xsc.XrayDetails.GetUrl() + scanGraphAPI + "/" + scanId + // TODO multi scan should be removed here but caused api to crash so dummy value inserted. + endPoint := xsc.XrayDetails.GetXscUrl() + scanGraphAPI + "/" + scanId + "?multi_scan_id=a" if includeVulnerabilities { endPoint += includeVulnerabilitiesParam if includeLicenses {