Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API change SCX to v4 #152

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/main/java/com/hcl/appscan/sdk/CoreConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@ public interface CoreConstants {
String API_SCANS = API_ENV + "/Scans"; //$NON-NLS-1$
String API_NONCOMPLIANT_ISSUES = API_ENV + "/Scans/%s/NonCompliantIssues"; //$NON-NLS-1$
String API_SCANS_REPORT = API_ENV_LATEST + "/Scans/%s/Report/%s"; //$NON-NLS-1$
String API_SCX = "SCX"; //$NON-NLS-1$
String API_REPORT_SELECTED_ISSUES = API_ENV_LATEST + "/Reports/Security/%s/%s"; //$NON-NLS-1$
String API_DOWNLOAD_REPORT = API_ENV_LATEST + "/Reports/%s/Download"; //$NON-NLS-1$
String API_SACLIENT_DOWNLOAD = "/api/%s/StaticAnalyzer/SAClientUtil?os=%s"; //$NON-NLS-1$
String API_SACLIENT_VERSION = "/api/%s/StaticAnalyzer/SAClientUtil?os=%s&meta=%s"; //$NON-NLS-1$
String API_SACLIENT_DOWNLOAD = API_ENV_LATEST + "/Tools/SAClientUtil?os=%s"; //$NON-NLS-1$
String API_SACLIENT_VERSION = API_ENV_LATEST + "/Tools/SAClientUtil?os=%s&meta=%s"; //$NON-NLS-1$
String API_KEY_PATH = "/api/ideclientuilogin"; //$NON-NLS-1$
String API_REPORT_STATUS = API_ENV_LATEST + "/Reports"; //$NON-NLS-1$
String API_ISSUES_COUNT = API_ENV_LATEST + "/Issues/%s/%s"; //$NON-NLS-1$
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/hcl/appscan/sdk/utils/ServiceUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void getSAClientUtil(File destination, Proxy proxy) throws IOExcep
*/
public static void getSAClientUtil(File destination, Proxy proxy, String serverURL, String acceptInvalidCerts) throws IOException {
String request_url = requiredServerURL(serverURL);
request_url += String.format(API_SACLIENT_DOWNLOAD, API_SCX, SystemUtil.getOS());
request_url += String.format(API_SACLIENT_DOWNLOAD, SystemUtil.getOS());

HttpClient client = new HttpClient(proxy,acceptInvalidCerts.equals("true"));
HttpResponse response = client.get(request_url, null, null);
Expand Down Expand Up @@ -97,7 +97,7 @@ public static String getSAClientVersion(Proxy proxy) throws IOException {
*/
public static String getSAClientVersion(Proxy proxy, String serverURL) throws IOException {
String request_url = requiredServerURL(serverURL);
request_url += String.format(API_SACLIENT_VERSION, API_SCX, SystemUtil.getOS(), "true");
request_url += String.format(API_SACLIENT_VERSION, SystemUtil.getOS(), "true");

HttpClient client = new HttpClient(proxy);
HttpResponse response = client.get(request_url, null, null);
Expand Down
Loading