From b20b506b1a3e94f82219924bfa4d7a55b90116d2 Mon Sep 17 00:00:00 2001 From: Vishal Chaudhary <102226698+vishalhcl-5960@users.noreply.github.com> Date: Thu, 15 Feb 2024 17:18:13 +0530 Subject: [PATCH] execution of SCA scan if the OSO option is checked (#137) --- .../com/hcl/appscan/sdk/scan/CloudScanServiceProvider.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hcl/appscan/sdk/scan/CloudScanServiceProvider.java b/src/main/java/com/hcl/appscan/sdk/scan/CloudScanServiceProvider.java index 960a78bd..614b1813 100644 --- a/src/main/java/com/hcl/appscan/sdk/scan/CloudScanServiceProvider.java +++ b/src/main/java/com/hcl/appscan/sdk/scan/CloudScanServiceProvider.java @@ -63,7 +63,12 @@ public String createAndExecuteScan(String type, Map params) { HttpResponse response; request_headers.put("Content-Type", "application/json"); request_headers.put("accept", "application/json"); - String request_url = m_authProvider.getServer() + String.format(API_SCANNER, type); + String request_url; + if(type.equals(SASTConstants.STATIC_ANALYZER) && !params.containsKey(UPLOAD_DIRECT) && params.containsKey(OPEN_SOURCE_ONLY)) { + request_url = m_authProvider.getServer() + String.format(API_SCANNER, SCA); + } else { + request_url = m_authProvider.getServer() + String.format(API_SCANNER, type); + } response = client.post(request_url,request_headers,params); int status = response.getResponseCode();