use of com.checkmarx.sdk.dto.AstScaResults in project cx-flow by checkmarx-ltd.
the class AbstractASTScanner method scan.
@Override
public ScanResults scan(ScanRequest scanRequest) {
ScanResults result = null;
log.info("--------------------- Initiating new {} scan ---------------------", scanType);
ScanParams sdkScanParams = toSdkScanParams(scanRequest);
AstScaResults internalResults = new AstScaResults(new SCAResults(), new ASTResults());
try {
bugTrackerEventTrigger.triggerScanStartedEvent(scanRequest);
internalResults = client.scan(sdkScanParams);
logRequest(scanRequest, internalResults, OperationResult.successful());
result = toScanResults(internalResults);
} catch (Exception e) {
treatError(scanRequest, internalResults, e);
}
return result;
}
use of com.checkmarx.sdk.dto.AstScaResults in project cx-flow by checkmarx-ltd.
the class AbstractASTScanner method getLatestScanResults.
@Override
public ScanResults getLatestScanResults(ScanRequest request) {
ScanParams sdkScanParams = ScanParams.builder().projectName(request.getProject()).scaConfig(request.getScaConfig()).filterConfiguration(request.getFilter()).build();
setScannerSpecificProperties(request, sdkScanParams);
AstScaResults internalResults = client.getLatestScanResults(sdkScanParams);
return toScanResults(internalResults);
}
use of com.checkmarx.sdk.dto.AstScaResults in project cx-flow by checkmarx-ltd.
the class AbstractASTScanner method actualScan.
private ScanResults actualScan(ScanRequest scanRequest, String path) {
ScanResults result = null;
log.info("--------------------- Initiating new {} scan ---------------------", scanType);
AstScaResults internalResults = new AstScaResults(new SCAResults(), new ASTResults());
try {
ScanParams sdkScanParams = toSdkScanParams(scanRequest, path);
internalResults = client.scan(sdkScanParams);
logRequest(scanRequest, internalResults, OperationResult.successful());
result = toScanResults(internalResults);
} catch (Exception e) {
treatError(scanRequest, internalResults, e);
}
return result;
}
use of com.checkmarx.sdk.dto.AstScaResults in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaTest method runScan.
protected AstScaResults runScan(RestClientConfig config) {
ScaScanner scanner = getScanner();
AstScaResults results = scanner.scan(getScanParams(config));
return results;
}
use of com.checkmarx.sdk.dto.AstScaResults in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaTest method localDirScan.
private void localDirScan(RestClientConfig config) throws MalformedURLException {
config.getScaConfig().setSourceLocationType(SourceLocationType.LOCAL_DIRECTORY);
Path sourcesDir = null;
try {
sourcesDir = extractTestProjectFromResources();
config.setSourceDir(sourcesDir.toString());
AstScaResults scanResults = runScan(config);
verifyScanResults(scanResults);
} finally {
deleteDir(sourcesDir);
}
}
Aggregations