use of com.checkmarx.sdk.dto.cx.CxScanSummary in project cx-flow by checkmarx-ltd.
the class GetResultsAnalyticsTestSteps method createFakeSASTScanResults.
private static ScanResults createFakeSASTScanResults() {
ScanResults result = new ScanResults();
CxScanSummary summary = new CxScanSummary();
result.setScanSummary(summary);
Map<String, Object> details = new HashMap<>();
details.put(Constants.SUMMARY_KEY, new HashMap<>());
result.setAdditionalDetails(details);
result.setXIssues(new ArrayList<>());
return result;
}
use of com.checkmarx.sdk.dto.cx.CxScanSummary in project cx-flow by checkmarx-ltd.
the class AnalyticsSteps method createFakeSASTScanResults.
private static ScanResults createFakeSASTScanResults(Map<FindingSeverity, Integer> findingsPerSeverity) {
CxScanSummary summary = new CxScanSummary();
summary.setHighSeverity(findingsPerSeverity.get(FindingSeverity.HIGH));
summary.setMediumSeverity(findingsPerSeverity.get(FindingSeverity.MEDIUM));
summary.setLowSeverity(findingsPerSeverity.get(FindingSeverity.LOW));
summary.setInfoSeverity(0);
HashMap<String, Object> flowSummary = new HashMap<>();
findingsPerSeverity.forEach((severity, count) -> flowSummary.put(severity.toString(), count));
Map<String, Object> details = new HashMap<>();
details.put(Constants.SUMMARY_KEY, flowSummary);
return ScanResults.builder().scanSummary(summary).additionalDetails(details).xIssues(new ArrayList<>()).build();
}
use of com.checkmarx.sdk.dto.cx.CxScanSummary in project cx-flow by checkmarx-ltd.
the class Github2AdoSteps method createAstFindings.
private void createAstFindings(ScanResults result) {
result.setAstResults(new ASTResults());
result.getAstResults().setScanId("111");
result.getAstResults().setWebReportLink(WEB_REPORT_LINK);
LinkedList<Finding> findings = new LinkedList();
findings.add(createAstFinding(1));
findings.add(createAstFinding(2));
result.getAstResults().setFindings(findings);
result.setScanSummary(new CxScanSummary());
result.getAstResults().setSummary(new AstSummaryResults());
}
use of com.checkmarx.sdk.dto.cx.CxScanSummary in project cx-flow by checkmarx-ltd.
the class ScanFixture method getScanResults.
public static ScanResults getScanResults() {
CxScanSummary scanSummary = new CxScanSummary();
scanSummary.setHighSeverity(1);
scanSummary.setMediumSeverity(1);
scanSummary.setLowSeverity(1);
scanSummary.setInfoSeverity(1);
scanSummary.setStatisticsCalculationDate("");
return ScanResults.builder().projectId(String.valueOf(PROJECT_ID)).team(TEAM_PATH).project(PROJECT_NAME).link(SCAN_LINK).files(FILES_SCANNED).loc(LOC_SCANNED).scanType(SCAN_TYPE).additionalDetails(null).scanSummary(scanSummary).xIssues(Lists.emptyList()).build();
}
use of com.checkmarx.sdk.dto.cx.CxScanSummary in project cx-flow by checkmarx-ltd.
the class ThresholdsSteps method createFakeScanResults.
private static ScanResults createFakeScanResults() {
ScanResults result = new ScanResults();
result.setScanSummary(new CxScanSummary());
Map<String, Object> details = new HashMap<>();
details.put(Constants.SUMMARY_KEY, new HashMap<>());
result.setAdditionalDetails(details);
result.setXIssues(new ArrayList<>());
return result;
}
Aggregations