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

ASA-8093 (#142) #143

Merged
merged 2 commits into from
Feb 28, 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
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ protected String getReportStatus(String reportId) throws IOException, JSONExcept
}

String request_url = authProvider.getServer() + API_REPORT_STATUS;
request_url += String.format("?$top=100&$filter=Id eq %s&$count=false",reportId);
request_url += "?%24top=100&%24filter=Id%20eq%20"+reportId+"&%24count=false";
Map<String, String> request_headers = authProvider.getAuthorizationHeader(true);
request_headers.put(CONTENT_LENGTH, "0"); //$NON-NLS-1$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public JSONObject getScanDetails(String scanId) throws IOException, JSONExceptio
return null;

String request_url = m_authProvider.getServer() + API_BASIC_DETAILS;
request_url +=String.format("?$filter=Id eq %s",scanId);
request_url += "?$filter=Id%20eq%20"+scanId;
Map<String, String> request_headers = m_authProvider.getAuthorizationHeader(true);

HttpClient client = new HttpClient(m_authProvider.getProxy(), m_authProvider.getacceptInvalidCerts());
Expand All @@ -153,7 +153,7 @@ public JSONObject getScanDetails(String scanId) throws IOException, JSONExceptio
return (JSONObject) array.getJSONObject(0);
}
} else if (response.getResponseCode() == -1) {
return new JSONObject().put(STATUS,UNKNOWN); //If the server is not reachable Internet disconnect
m_progress.setStatus(new Message(Message.ERROR, Messages.getMessage(ERROR_GETTING_DETAILS, scanId)));
} else if (response.getResponseCode() != HttpsURLConnection.HTTP_BAD_REQUEST) {
JSONArtifact json = response.getResponseBodyAsJSON();
if (json != null && ((JSONObject)json).has(MESSAGE))
Expand All @@ -179,7 +179,7 @@ public JSONArray getNonCompliantIssues(String scanId) throws IOException, JSONEx
return null;

String request_url = m_authProvider.getServer() + String.format(API_ISSUES_COUNT, "Scan", scanId);
request_url +="?$apply=groupby((Severity),aggregate($count as N))";
request_url += "?applyPolicies=All&%24apply=groupby%28%28Severity%29%2Caggregate%28%24count%20as%20N%29%29";
Map<String, String> request_headers = m_authProvider.getAuthorizationHeader(true);
request_headers.put("Content-Type", "application/json; charset=UTF-8");
request_headers.put("Accept", "application/json");
Expand Down
Loading