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 7231 #131

Merged
merged 19 commits into from
Jan 25, 2024
Merged

ASA 7231 #131

merged 19 commits into from
Jan 25, 2024

Conversation

vishalhcl-5960
Copy link

Handled the report name issue

@@ -59,7 +59,9 @@ public interface IScanServiceProvider {
* @throws JSONException If an error occurs.
*/
public JSONObject getScanDetails(String scanId) throws IOException, JSONException;


public String getScanExecutionName();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you need this method here ?


@Override

@Override

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for override if you remove the method from Interface.

@@ -55,6 +55,9 @@ public String createAndExecuteScan(String type, Map<String, String> params) {
public String createAndExecuteScanWithJSONParameter(String type, JSONObject params) {
return "";
}

@Override

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we can remove it from the ASE Provider as well.

@@ -179,15 +179,17 @@ public JSONObject getScanDetails(String scanId) throws IOException, JSONExceptio
if(loginExpired())
return null;

String request_url = m_authProvider.getServer() + String.format(API_BASIC_DETAILS, scanId);
String request_url = m_authProvider.getServer() + API_BASIC_DETAILS;
request_url += "?$filter=Id eq " +String.format("%s",scanId);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to use String.format() here as opposed to just using the scanId directly? If there's a need to use String.format(), I suggest using the full string "?$filter=Id eq %s" instead of appending to that value.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, Matt. Now, I am appending the following string in the request_url: String.format("?$filter=Id eq %s",scanId).

@vishalhcl-5960 vishalhcl-5960 merged commit 8c22d77 into HCL-TECH-SOFTWARE:v2-->-v4 Jan 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants