use of com.checkmarx.sdk.dto.sca.ScaConfig in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaTest method getScaConfig.
protected ScaConfig getScaConfig(boolean useOnPremiseAuthentication) {
String accessControlProp, usernameProp, passwordProp;
if (useOnPremiseAuthentication) {
// passwordProp = onPremisePass;
throw new UnsupportedOperationException();
} else {
accessControlProp = scaProperties.getAccessControlUrl();
usernameProp = scaProperties.getUsername();
passwordProp = scaProperties.getPassword();
}
ScaConfig result = new ScaConfig();
result.setApiUrl(scaProperties.getApiUrl());
result.setWebAppUrl(scaProperties.getAppUrl());
result.setTenant(scaProperties.getTenant());
result.setAccessControlUrl(accessControlProp);
result.setUsername(usernameProp);
result.setPassword(passwordProp);
result.setIncludeSources(false);
return result;
}
use of com.checkmarx.sdk.dto.sca.ScaConfig in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaTest method getScanParams.
private ScanParams getScanParams(RestClientConfig config) {
com.checkmarx.sdk.config.ScaConfig scaConfig = new com.checkmarx.sdk.config.ScaConfig();
scaConfig.setAccessControlUrl(scaProperties.getAccessControlUrl());
scaConfig.setApiUrl(scaProperties.getApiUrl());
scaConfig.setAppUrl(scaProperties.getAppUrl());
scaConfig.setTenant(scaProperties.getTenant());
scaConfig.setThresholdsScore(scaProperties.getThresholdsScore());
scaConfig.setThresholdsSeverity(new HashMap<>());
scaConfig.setThresholdsSeverityDirectly(new HashMap<>());
ScanParams scanParams = ScanParams.builder().projectName(config.getProjectName()).remoteRepoUrl(getRepoUrl()).scaConfig(scaConfig).build();
return scanParams;
}
use of com.checkmarx.sdk.dto.sca.ScaConfig 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.dto.sca.ScaConfig in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaTest method initScaConfig.
protected RestClientConfig initScaConfig(boolean useOnPremAuthentication) {
RestClientConfig config = new RestClientConfig();
config.setProjectName("sdkScaProject");
config.setProgressInterval(5);
ScaConfig sca = getScaConfig(useOnPremAuthentication);
config.setScaConfig(sca);
return config;
}
use of com.checkmarx.sdk.dto.sca.ScaConfig in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScaScanner method getScaSpecificConfig.
private ScaConfig getScaSpecificConfig(ScanParams scanParams) {
ScaConfig scaConfig = new ScaConfig();
com.checkmarx.sdk.config.ScaConfig sdkScaConfig = scanParams.getScaConfig();
if (sdkScaConfig != null) {
scaConfig.setWebAppUrl(sdkScaConfig.getAppUrl());
scaConfig.setApiUrl(sdkScaConfig.getApiUrl());
scaConfig.setAccessControlUrl(sdkScaConfig.getAccessControlUrl());
scaConfig.setTenant(sdkScaConfig.getTenant());
scaConfig.setIncludeSources(sdkScaConfig.isIncludeSources());
scaConfig.setExcludeFiles(sdkScaConfig.getExcludeFiles());
scaConfig.setUsername(scaProperties.getUsername());
scaConfig.setPassword(scaProperties.getPassword());
scaConfig.setFingerprintsIncludePattern(scaProperties.getFingerprintsIncludePattern());
scaConfig.setManifestsIncludePattern(scaProperties.getManifestsIncludePattern());
scaConfig.setTeam(sdkScaConfig.getTeam());
scaConfig.setScanTimeout(sdkScaConfig.getScanTimeout());
String zipPath = scanParams.getZipPath();
if (StringUtils.isNotEmpty(zipPath)) {
scaConfig.setZipFilePath(zipPath);
}
} else {
log.warn("Unable to map SCA configuration to an internal object.");
}
return scaConfig;
}
Aggregations