use of com.checkmarx.flow.dto.iast.manager.dto.ResultInfo in project cx-flow by checkmarx-ltd.
the class IastService method createIssue.
private void createIssue(ScanRequest request, Scan scan) throws IOException {
try {
final ScanVulnerabilities scanVulnerabilities = iastServiceRequests.apiScanVulnerabilities(scan.getScanId());
List<VulnerabilityInfo> vulnerabilities = scanVulnerabilities.getVulnerabilities();
for (VulnerabilityInfo vulnerability : vulnerabilities) {
if (vulnerability.getNewCount() != 0) {
final List<ResultInfo> scansResultsQuery = iastServiceRequests.apiScanResults(scan.getScanId(), vulnerability.getId());
final List<ResultInfo> scansResultQueryList = scansResultsQuery.stream().filter(scansResultQuery -> scansResultQuery.isNewResult() && filterSeverity(scansResultQuery)).collect(Collectors.toList());
for (ResultInfo scansResultQuery : scansResultQueryList) {
createIssue(scanVulnerabilities, request, scansResultQuery, vulnerability, scan);
}
}
}
thresholdsSeverity(scanVulnerabilities);
} catch (NotImplementedException e) {
throw new NotImplementedException(request.getBugTracker().getType().getType() + ". That bug tracker not implemented.");
} catch (IOException e) {
throw new IOException("Can't send api request", e);
}
}
Aggregations