diff --git a/src/main/java/com/cx/restclient/dto/scansummary/ScanSummary.java b/src/main/java/com/cx/restclient/dto/scansummary/ScanSummary.java index c1a67fc5..8fdb121d 100644 --- a/src/main/java/com/cx/restclient/dto/scansummary/ScanSummary.java +++ b/src/main/java/com/cx/restclient/dto/scansummary/ScanSummary.java @@ -94,7 +94,6 @@ private void addSastThresholdErrors(CxScanConfig config, SASTResults sastResults checkForThresholdError(sastResults.getHigh(), config.getSastHighThreshold(), ErrorSource.SAST, Severity.HIGH); checkForThresholdError(sastResults.getMedium(), config.getSastMediumThreshold(), ErrorSource.SAST, Severity.MEDIUM); checkForThresholdError(sastResults.getLow(), config.getSastLowThreshold(), ErrorSource.SAST, Severity.LOW); - checkForThresholdError(sastResults.getCritical(), config.getSastCriticalThreshold(), ErrorSource.SAST, Severity.CRITICAL); } } @@ -105,7 +104,6 @@ private void addDependencyScanThresholdErrors(CxScanConfig config, OSAResults os int totalHigh = 0; int totalMedium = 0; int totalLow = 0; - int totalCritical = 0; boolean hasSummary = false; if (scaResults != null) { diff --git a/src/main/java/com/cx/restclient/sast/dto/SASTResults.java b/src/main/java/com/cx/restclient/sast/dto/SASTResults.java index 15fb76e4..25213e65 100644 --- a/src/main/java/com/cx/restclient/sast/dto/SASTResults.java +++ b/src/main/java/com/cx/restclient/sast/dto/SASTResults.java @@ -98,7 +98,8 @@ public void setSastLanguage(String sastLanguage) { private List sastPolicies = new ArrayList<>(); public enum Severity { - Critical, CRITICAL, High, Medium, Low, Information; + Critical, High, Medium, Low, Information; + } @@ -123,7 +124,7 @@ public void setScanDetailedReport(CxXMLResults reportObj,CxScanConfig config) th } else if ("New".equals(result.getStatus())) { Severity sev = Severity.valueOf(result.getSeverity()); switch (sev) { - case CRITICAL: + case Critical: newCritical++; break; @@ -161,7 +162,6 @@ private void setLanguageEquivalent(String sastLanguage) { languageMap.put("High", lang.getHigh()); languageMap.put("Medium", lang.getMedium()); languageMap.put("Low", lang.getLow()); - languageMap.put("CRITICAL", lang.getCritical()); } } diff --git a/src/main/resources/com/cx/report/report.ftl b/src/main/resources/com/cx/report/report.ftl index af51f515..bd66b596 100644 --- a/src/main/resources/com/cx/report/report.ftl +++ b/src/main/resources/com/cx/report/report.ftl @@ -2222,7 +2222,7 @@ Issues Found <#list sast.queryList as query> - <#if (query.severity == sast.languageMap["Critical"]) || (query.severity == "CRITICAL")> + <#if query.severity == sast.languageMap["Critical"]> ${sast.encodeXSS(query.name)} ${query.result?size}