Search in sources :

Example 1 with RemoteRepositoryInfo

use of com.checkmarx.sdk.dto.RemoteRepositoryInfo in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.

the class ScaTest method initScaConfig.

protected RestClientConfig initScaConfig(String repoUrlProp, boolean useOnPremAuthentication) throws MalformedURLException {
    RestClientConfig config = initScaConfig(useOnPremAuthentication);
    config.getScaConfig().setSourceLocationType(SourceLocationType.REMOTE_REPOSITORY);
    RemoteRepositoryInfo repoInfo = new RemoteRepositoryInfo();
    URL repoUrl = new URL(repoUrlProp);
    repoInfo.setUrl(repoUrl);
    repoInfo.setUsername(githubProperties.getToken());
    config.getScaConfig().setRemoteRepositoryInfo(repoInfo);
    return config;
}
Also used : RemoteRepositoryInfo(com.checkmarx.sdk.dto.RemoteRepositoryInfo) RestClientConfig(com.checkmarx.sdk.config.RestClientConfig) URL(java.net.URL)

Example 2 with RemoteRepositoryInfo

use of com.checkmarx.sdk.dto.RemoteRepositoryInfo 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;
}
Also used : RemoteRepositoryInfo(com.checkmarx.sdk.dto.RemoteRepositoryInfo) ScaConfig(com.checkmarx.sdk.dto.sca.ScaConfig) RestClientConfig(com.checkmarx.sdk.config.RestClientConfig)

Example 3 with RemoteRepositoryInfo

use of com.checkmarx.sdk.dto.RemoteRepositoryInfo in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.

the class AstTest method getScanConfig.

private RestClientConfig getScanConfig() throws MalformedURLException {
    AstConfig astConfig = AstConfig.builder().apiUrl(astProperties.getApiUrl()).webAppUrl(astProperties.getWebAppUrl()).clientSecret(astProperties.getClientSecret()).clientId("CxFlow").sourceLocationType(SourceLocationType.REMOTE_REPOSITORY).build();
    RemoteRepositoryInfo repoInfo = new RemoteRepositoryInfo();
    URL repoUrl = new URL(githubProperties.getUrl());
    repoInfo.setUrl(repoUrl);
    astConfig.setRemoteRepositoryInfo(repoInfo);
    astConfig.setResultsPageSize(10);
    astConfig.setPresetName("Checkmarx Default");
    RestClientConfig config = new RestClientConfig();
    config.setAstConfig(astConfig);
    config.setProjectName("sdkAstProject");
    config.setProgressInterval(5);
    return config;
}
Also used : RemoteRepositoryInfo(com.checkmarx.sdk.dto.RemoteRepositoryInfo) AstConfig(com.checkmarx.sdk.config.AstConfig) RestClientConfig(com.checkmarx.sdk.config.RestClientConfig) URL(java.net.URL)

Aggregations

RestClientConfig (com.checkmarx.sdk.config.RestClientConfig)3 RemoteRepositoryInfo (com.checkmarx.sdk.dto.RemoteRepositoryInfo)3 URL (java.net.URL)2 AstConfig (com.checkmarx.sdk.config.AstConfig)1 ScaConfig (com.checkmarx.sdk.dto.sca.ScaConfig)1