use of com.checkmarx.sdk.config.RestClientConfig in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaTest method scan_localDirUpload.
@Test
public void scan_localDirUpload() throws IOException, ScannerRuntimeException {
RestClientConfig config = initScaConfig(false);
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);
}
}
use of com.checkmarx.sdk.config.RestClientConfig in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class AstTest method scan_remotePublicRepo.
@Test
public void scan_remotePublicRepo() throws MalformedURLException {
RestClientConfig config = getScanConfig();
AstScanner scanner = getScanner();
AstScaResults scanResults = scanner.scan(toSdkScanParams(config));
validateFinalResults(scanResults);
}
use of com.checkmarx.sdk.config.RestClientConfig in project cx-flow by checkmarx-ltd.
the class ScaCommonSteps method createRestClientConfig.
protected RestClientConfig createRestClientConfig(ScaProperties scaProperties, String projectName) {
ScaConfig scaConfig = new ScaConfig();
scaConfig.setTenant(scaProperties.getTenant());
scaConfig.setApiUrl(scaProperties.getApiUrl());
scaConfig.setUsername(scaProperties.getUsername());
scaConfig.setPassword(scaProperties.getPassword());
scaConfig.setAccessControlUrl(scaProperties.getAccessControlUrl());
scaConfig.setRemoteRepositoryInfo(new RemoteRepositoryInfo());
RestClientConfig restClientConfig = new RestClientConfig();
restClientConfig.setScaConfig(scaConfig);
restClientConfig.setProjectName(projectName);
return restClientConfig;
}
use of com.checkmarx.sdk.config.RestClientConfig in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class AbstractScanner method scanWithNoWaitingToResults.
public void scanWithNoWaitingToResults(ScanParams scanParams) {
validateScanParams(scanParams);
RestClientConfig scanConfig = getScanConfig(scanParams);
try {
this.client = allocateClient(scanConfig);
client.init();
client.initiateScan();
} finally {
client.close();
}
}
use of com.checkmarx.sdk.config.RestClientConfig in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class AbstractScanner method scan.
public AstScaResults scan(ScanParams scanParams) {
validateScanParams(scanParams);
RestClientConfig scanConfig = getScanConfig(scanParams);
scanConfig.setProgressInterval(SCA_SCAN_INTERVAL_IN_SECONDS);
ResultsBase scanResults = executeScan(scanConfig);
AstScaResults results = toResults(scanResults);
applyFilterToResults(results, scanParams);
return results;
}
Aggregations