Skip to content

Commit

Permalink
Fix date & multi scan on get
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Aug 20, 2023
1 parent a469339 commit 58b7b7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xray/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

const (
scanGraphAPI = "api/v1/scan/graph"
scanGraphAPI = "api/v1/sca/scan/graph"

// Graph scan query params
repoPathQueryParam = "repo_path="
Expand Down Expand Up @@ -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"`
}
3 changes: 2 additions & 1 deletion xray/scan/xscScan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 58b7b7f

Please sign in to comment.