use of com.checkmarx.sdk.dto.sast.CxConfig in project cx-flow by checkmarx-ltd.
the class GitLabServiceTest method getCxConfig.
@IfProfileValue(name = "testprofile", value = "integration")
@Test
public void getCxConfig() {
ScanRequest request = ScanRequest.builder().namespace("custodela-test").repoName("WebGoat").branch("develop").build();
request.setRepoProjectId(11842418);
CxConfig cxConfig = service.getCxConfigOverride(request);
assertNotNull(cxConfig);
}
use of com.checkmarx.sdk.dto.sast.CxConfig in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class ScanUtils method getConfigAsCode.
public static CxConfig getConfigAsCode(String jsonConfig) {
log.debug("Loading CxConfig: {}", jsonConfig);
CxConfig cxConfig = null;
ObjectMapper mapper = new ObjectMapper();
// if override is provided, check if chars are more than 20 in length, implying base64 encoded json
try {
cxConfig = mapper.readValue(jsonConfig, CxConfig.class);
} catch (IOException e) {
log.warn("Error parsing CxConfig file: {}", ExceptionUtils.getRootCauseMessage(e));
}
return cxConfig;
}
Aggregations