use of com.checkmarx.sdk.exception.CheckmarxException in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class CxRepoFileHelper method getScaClonedRepoFolderPath.
public String getScaClonedRepoFolderPath(String repoUrlWithAuth, List<String> excludeFiles, String branch) throws CheckmarxException {
CxScanParams cxScanParams = prepareScanParamsToCloneRepo(repoUrlWithAuth, excludeFiles, branch);
File pathFile = null;
try {
pathFile = gitCloneAndRunPostCloneScript(cxScanParams);
} catch (GitAPIException | URISyntaxException e) {
log.error(ExceptionUtils.getRootCauseMessage(e));
throw new CheckmarxException("Unable to clone Git Url.");
}
return pathFile.getAbsolutePath();
}
use of com.checkmarx.sdk.exception.CheckmarxException in project checkmarx-spring-boot-java-sdk by checkmarx-ltd.
the class CxRepoFileHelper method prepareRepoFile.
public String prepareRepoFile(CxScanParams params) throws CheckmarxException {
try {
File pathFile = gitCloneAndRunPostCloneScript(params);
String zipFilePath = zipClonedRepo(pathFile, params.getFileExclude());
deleteCloneLocalDir(pathFile);
return zipFilePath;
} catch (GitAPIException | IOException | URISyntaxException e) {
log.error(ExceptionUtils.getRootCauseMessage(e));
throw new CheckmarxException("Unable to clone Git Url.");
}
}
Aggregations