From acaa7922d70f2d6996851e9a44ab02cd778687d2 Mon Sep 17 00:00:00 2001 From: Vishal Chaudhary Date: Wed, 14 Feb 2024 18:29:33 +0530 Subject: [PATCH] execution of SCA scan if the OSO option is checked --- .../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();