use of com.checkmarx.flow.dto.BugTracker in project cx-flow by checkmarx-ltd.
the class ScaCommonSteps method getBasicScanRequest.
protected ScanRequest getBasicScanRequest(String projectName, String repoWithAuth) {
BugTracker bt = BugTracker.builder().type(BugTracker.Type.JIRA).customBean("JIRA").build();
ScanRequest request = ScanRequest.builder().project(projectName).repoUrlWithAuth(repoWithAuth).branch("master").repoType(ScanRequest.Repository.GITHUB).bugTracker(bt).build();
scaConfigOverrider.initScaConfig(request);
return request;
}
use of com.checkmarx.flow.dto.BugTracker in project cx-flow by checkmarx-ltd.
the class GetResultsAnalyticsTestSteps method createScanRequest.
private ScanRequest createScanRequest() {
ScanRequest scanRequest = new ScanRequest();
BugTracker issueTracker = BugTracker.builder().type(BugTracker.Type.NONE).build();
scanRequest.setBugTracker(issueTracker);
scanRequest.setMergeNoteUri(MERGE_NOTE_URL);
scanRequest.setProduct(ScanRequest.Product.CX);
Map<String, String> additionalMetaData = new HashMap<>();
additionalMetaData.put("statuses_url", PULL_REQUEST_STATUSES_URL);
scanRequest.setAdditionalMetadata(additionalMetaData);
return scanRequest;
}
use of com.checkmarx.flow.dto.BugTracker in project cx-flow by checkmarx-ltd.
the class GitHubCommentsASTSteps method createScanRequest.
private ScanRequest createScanRequest() {
ScanRequest scanRequest = new ScanRequest();
scanRequest.setMergeNoteUri(MERGE_NOTE_URL);
scanRequest.setProduct(ScanRequest.Product.CX);
Map<String, String> additionalMetaData = new HashMap<>();
additionalMetaData.put("statuses_url", PULL_REQUEST_STATUSES_URL);
scanRequest.setAdditionalMetadata(additionalMetaData);
if (repo.equals(ScanRequest.Repository.GITHUB)) {
scanRequest.setRepoType(ScanRequest.Repository.GITHUB);
BugTracker issueTracker = BugTracker.builder().type(BugTracker.Type.GITHUBPULL).build();
scanRequest.setBugTracker(issueTracker);
} else {
throw new UnsupportedOperationException();
}
return scanRequest;
}
use of com.checkmarx.flow.dto.BugTracker in project cx-flow by checkmarx-ltd.
the class ThresholdsSteps method createScanRequest.
private ScanRequest createScanRequest(boolean isGitHub) {
ScanRequest scanRequest = new ScanRequest();
BugTracker.Type issueTruckerType;
Map<String, String> additionalMetadata = new HashMap<>();
additionalMetadata.put(STATUSES_URL_KEY, PULL_REQUEST_STATUSES_URL);
if (isGitHub) {
issueTruckerType = BugTracker.Type.GITHUBPULL;
scanRequest.setMergeNoteUri(MERGE_NOTE_URL);
scanRequest.setRepoType(ScanRequest.Repository.GITHUB);
} else {
issueTruckerType = BugTracker.Type.ADOPULL;
additionalMetadata.put("status_id", Integer.toString(1));
additionalMetadata.put("ado_thread_id", Integer.toString(0));
scanRequest.setRepoType(ScanRequest.Repository.ADO);
scanRequest.setMergeNoteUri(MERGE_NOTE_URL);
scanResultsToInject.setProjectId(Integer.toString(0));
}
BugTracker issueTracker = BugTracker.builder().type(issueTruckerType).build();
scanRequest.setBugTracker(issueTracker);
scanRequest.setProduct(ScanRequest.Product.CX);
scanRequest.setAdditionalMetadata(additionalMetadata);
return scanRequest;
}
use of com.checkmarx.flow.dto.BugTracker in project cx-flow by checkmarx-ltd.
the class IastCliSteps method runningIastService.
@SneakyThrows
@When("running iast service {}")
public void runningIastService(String scanTag) {
scanTag = removeQuotes(scanTag);
try {
BugTracker.Type bugType = BugTracker.Type.GITHUBCOMMIT;
String assignee = "test_user";
BugTracker bt = BugTracker.builder().type(bugType).assignee(assignee).build();
ScanRequest request = ScanRequest.builder().bugTracker(bt).build();
iastService.stopScanAndCreateIssue(request, scanTag);
} catch (IastThresholdsSeverityException e) {
// that is ok. Just Thresholds Severity
}
}
Aggregations