use of com.mercedesbenz.sechub.adapter.checkmarx.support.CheckmarxProjectSupport in project sechub by mercedes-benz.
the class CheckmarxAdapterV1 method execute.
@Override
public String execute(CheckmarxAdapterConfig config, AdapterRuntimeContext runtimeContext) throws AdapterException {
try {
assertNotInterrupted();
CheckmarxContext context = new CheckmarxContext(config, this, runtimeContext);
context.setFullScan(context.isNewProject() || config.isAlwaysFullScanEnabled());
CheckmarxOAuthSupport oauthSupport = new CheckmarxOAuthSupport();
oauthSupport.loginAndGetOAuthToken(context);
assertNotInterrupted();
/* ensure project and get project context */
CheckmarxProjectSupport projectSupport = new CheckmarxProjectSupport();
projectSupport.ensureProjectExists(context);
assertNotInterrupted();
handleUploadSourceCodeAndStartScan(oauthSupport, context);
assertNotInterrupted();
CheckmarxScanReportSupport scanReportSupport = new CheckmarxScanReportSupport();
scanReportSupport.startFetchReport(oauthSupport, context);
return context.getResult();
} catch (Exception e) {
throw asAdapterException("Was not able to perform scan!", e, config);
}
}
Aggregations