use of com.checkmarx.flow.dto.BugTracker in project cx-flow by checkmarx-ltd.
the class AstRemoteRepoScanSteps method startScan.
public void startScan(List<VulnerabilityScanner> scanners, String branch, String repo, boolean isPublicRepo, String projectName) {
CxProperties cxProperties = new CxProperties();
ExternalScriptService scriptService = new ExternalScriptService();
CxScannerService cxScannerService = new CxScannerService(cxProperties, null, null, null, null);
HelperService helperService = new HelperService(flowProperties, cxScannerService, jiraProperties, scriptService);
ProjectNameGenerator projectNameGenerator = new ProjectNameGenerator(helperService, cxScannerService, flowProperties);
FlowService flowService = new FlowService(new ArrayList<>(), projectNameGenerator, resultsServiceMock);
ScanRequest scanRequest = getBasicScanRequest(branch, repo, isPublicRepo, projectName);
scanRequest = configOverrider.overrideScanRequestProperties(new CxConfig(), scanRequest);
scanRequest.setVulnerabilityScanners(scanners);
BugTracker bt = BugTracker.builder().type(BugTracker.Type.JIRA).customBean("JIRA").build();
scanRequest.setBugTracker(bt);
flowService.initiateAutomation(scanRequest);
}
use of com.checkmarx.flow.dto.BugTracker in project cx-flow by checkmarx-ltd.
the class AnalyticsSteps method createScanRequest.
private static ScanRequest createScanRequest(String repoUrl) {
ScanRequest scanRequest = new ScanRequest();
BugTracker issueTracker = BugTracker.builder().type(BugTracker.Type.GITHUBPULL).build();
scanRequest.setBugTracker(issueTracker);
scanRequest.setMergeNoteUri(MERGE_NOTE_URL);
scanRequest.setProduct(ScanRequest.Product.CX);
scanRequest.setRepoUrl(repoUrl);
HashMap<String, String> metadata = new HashMap<>();
metadata.put("statuses_url", PULL_REQUEST_STATUSES_URL);
scanRequest.setAdditionalMetadata(metadata);
return scanRequest;
}
Aggregations