Skip to content

Commit

Permalink
suggested changes (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalhcl-5960 authored Feb 6, 2024
1 parent 2575cb2 commit 24fb274
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/hcl/appscan/sdk/CoreConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public interface CoreConstants {
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_KEY_PATH = "/api/ideclientuilogin"; //$NON-NLS-1$
String API_REPORT_STATUS = "/api/v4/Reports"; //$NON-NLS-1$
String API_ISSUES_COUNT = "/api/v4/Issues/%s/%s"; //$NON-NLS-1$
String API_REGIONS = "/api/v4/Utils/Regions"; //$NON-NLS-1$
String API_IS_VALID_URL = "/api/v4/Scans/IsValidUrl"; //$NON-NLS-1$
String API_AUTHENTICATION = "/api/v4/Account/IsAuthenticated"; //$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$
String API_REGIONS = API_ENV_LATEST + "/Utils/Regions"; //$NON-NLS-1$
String API_IS_VALID_URL = API_ENV_LATEST + "/Scans/IsValidUrl"; //$NON-NLS-1$
String API_AUTHENTICATION = API_ENV_LATEST + "/Account/IsAuthenticated"; //$NON-NLS-1$

String DEFAULT_RESULT_NAME = "asoc_results"; //$NON-NLS-1$
String SACLIENT_INSTALL_DIR = "SAClientInstall"; //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ public CloudScanServiceProvider(IProgress progress, IAuthenticationProvider auth

@Override
public String createAndExecuteScan(String type, Map<String, String> params) {
if(loginExpired() || !verifyApplication(params.get(APP_ID).toString()))
if(loginExpired() || params.containsKey(APP_ID)) {
if(!verifyApplication(params.get(APP_ID).toString())) {
return null;
}
return null;
}

m_progress.setStatus(new Message(Message.INFO, Messages.getMessage(EXECUTING_SCAN)));
Map<String, String> request_headers = m_authProvider.getAuthorizationHeader(true);
Expand Down

0 comments on commit 24fb274

Please sign in to comment.