forked from AppSecDev/appscan-sdk
-
Notifications
You must be signed in to change notification settings - Fork 16
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
vishalhcl-5960
merged 19 commits into
HCL-TECH-SOFTWARE:v2-->-v4
from
vishalhcl-5960:ASA-7231
Jan 25, 2024
Merged
ASA 7231 #131
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
a2af44c
v2 -> v4
vishalhcl-5960 43b0c08
DAST api migration
vishalhcl-5960 5ee1ecb
Merge branch 'HCL-TECH-SOFTWARE:master' into ASA-7231
vishalhcl-5960 a370a01
Update CoreConstants.java
vishalhcl-5960 352547b
Added the copyright years
vishalhcl-5960 2c9fbbc
Identation check
vishalhcl-5960 7a4ac22
Update DASTConstants.java
vishalhcl-5960 9029154
Suggested changes
vishalhcl-5960 6e5afb8
Update HttpClient.java
vishalhcl-5960 219b4e4
Added the ExtraField parameter in the Login object
vishalhcl-5960 2ed7017
Merge branch 'v2-->-v4' into ASA-7231
vishalhcl-5960 fd14841
Update DASTConstants.java
vishalhcl-5960 f4ac12e
Report name issue
vishalhcl-5960 42648fc
Modified the API
vishalhcl-5960 5183091
Indentation resolution
vishalhcl-5960 14110ff
Update IScanServiceProvider.java
vishalhcl-5960 811886c
Update DASTScan.java
vishalhcl-5960 5625d65
Update DASTScan.java
vishalhcl-5960 d839d8d
Update CloudScanServiceProvider.java
vishalhcl-5960 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ public class CloudScanServiceProvider implements IScanServiceProvider, Serializa | |
private static final long serialVersionUID = 1L; | ||
|
||
private IProgress m_progress; | ||
private String scanExecutionName; | ||
private IAuthenticationProvider m_authProvider; | ||
private static final String[] DAST_FILES_EXTENSIONS = {DASTConstants.SCAN_EXTENSION, DASTConstants.SCANT_EXTENSION, DASTConstants.CONFIG_EXTENSION}; | ||
|
||
|
@@ -57,6 +58,7 @@ public String createAndExecuteScan(String type, Map<String, String> params) { | |
m_progress.setStatus(new Message(Message.INFO, Messages.getMessage(EXECUTING_SCAN))); | ||
Map<String, String> request_headers = m_authProvider.getAuthorizationHeader(true); | ||
HttpClient client = new HttpClient(m_authProvider.getProxy(), m_authProvider.getacceptInvalidCerts()); | ||
scanExecutionName = params.get("ScanName"); | ||
|
||
try { | ||
HttpResponse response; | ||
|
@@ -95,7 +97,7 @@ public String createAndExecuteScan(String type, Map<String, String> params) { | |
} | ||
|
||
@Override | ||
public String createAndExecuteScanWithJSONParameter(String type, JSONObject params) { | ||
public String createAndExecuteScanWithJSONParameter(String type, JSONObject params) throws JSONException { | ||
try { | ||
if(loginExpired() || !verifyApplication(params.get(APP_ID).toString())) | ||
return null; | ||
|
@@ -106,6 +108,7 @@ public String createAndExecuteScanWithJSONParameter(String type, JSONObject para | |
m_progress.setStatus(new Message(Message.INFO, Messages.getMessage(EXECUTING_SCAN))); | ||
Map<String, String> request_headers = m_authProvider.getAuthorizationHeader(true); | ||
HttpClient client = new HttpClient(m_authProvider.getProxy(), m_authProvider.getacceptInvalidCerts()); | ||
scanExecutionName = params.getString("ScanName"); | ||
|
||
try { | ||
HttpResponse response; | ||
|
@@ -209,8 +212,13 @@ public JSONObject getScanDetails(String scanId) throws IOException, JSONExceptio | |
|
||
return null; | ||
} | ||
|
||
@Override | ||
|
||
@Override | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for override if you remove the method from Interface. |
||
public String getScanExecutionName() { | ||
return scanExecutionName; | ||
} | ||
|
||
@Override | ||
public JSONArray getNonCompliantIssues(String scanId) throws IOException, JSONException { | ||
if(loginExpired()) | ||
return null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ public interface IScanServiceProvider { | |
* @param params A JSON of scan parameters. | ||
* @return The id of the submitted scan, if successful. Otherwise, null. | ||
*/ | ||
public String createAndExecuteScanWithJSONParameter(String type, JSONObject params); | ||
public String createAndExecuteScanWithJSONParameter(String type, JSONObject params) throws JSONException; | ||
|
||
/** | ||
* Submits a file for scanning. | ||
|
@@ -59,7 +59,9 @@ public interface IScanServiceProvider { | |
* @throws JSONException If an error occurs. | ||
*/ | ||
public JSONObject getScanDetails(String scanId) throws IOException, JSONException; | ||
|
||
|
||
public String getScanExecutionName(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why you need this method here ? |
||
|
||
/** | ||
* Gets the non compliant issues in JSON format. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.