diff options
author | Lukasz Jarocki <lukasz.jarocki@sonarsource.com> | 2021-08-30 16:54:28 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-08-30 20:08:20 +0000 |
commit | 5e70de50954591ef9802531660478ca1d3be3379 (patch) | |
tree | 3fd6edb323c72d634b7a461a1f3e75287252cb1b | |
parent | ecf58b951dba30f565e714ca66fd48bfc74986ed (diff) | |
download | sonarqube-5e70de50954591ef9802531660478ca1d3be3379.tar.gz sonarqube-5e70de50954591ef9802531660478ca1d3be3379.zip |
SONAR-15345 Fixed the numbers of CWEs for 2021
2 files changed, 5 insertions, 5 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java b/server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java index d895b0bc221..137aea7497a 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java @@ -85,9 +85,9 @@ public final class SecurityStandards { // https://cwe.mitre.org/top25/archive/2021/2021_cwe_top25.html public static final List<String> CWE_TOP25_2021 = - Collections.unmodifiableList(asList("119", "79", "20", "200", "125", "89", "416", "190", "352", - "22", "78", "787", "287", "476", "732", "434", "611", "94", - "798", "400", "772", "426", "502", "269", "295")); + Collections.unmodifiableList(asList("787", "79", "125", "20", "78", "89", "416", "22", "352", + "434", "306", "190", "502", "287", "476", "798", "119", "862", + "276", "200", "522", "732", "611", "918", "77")); public static final Map<String, List<String>> CWES_BY_CWE_TOP_25 = Map.of( "2019", CWE_TOP25_2019, diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java index e7c6c8dab86..eaf2b49080d 100644 --- a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java +++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java @@ -371,7 +371,7 @@ public class IssueIndexSecurityReportsTest { SecurityStandardCategoryStatistics::getToReviewSecurityHotspots, SecurityStandardCategoryStatistics::getReviewedSecurityHotspots) .containsExactlyInAnyOrder(0L, 1L, 0L); - assertThat(findRuleInCweByYear(cwe2021, "862")).isNull(); + assertThat(findRuleInCweByYear(cwe2021, "295")).isNull(); assertThat(findRuleInCweByYear(cwe2021, "999")).isNull(); } @@ -455,7 +455,7 @@ public class IssueIndexSecurityReportsTest { SecurityStandardCategoryStatistics::getToReviewSecurityHotspots, SecurityStandardCategoryStatistics::getReviewedSecurityHotspots) .containsExactlyInAnyOrder(0L, 1L, 0L); - assertThat(findRuleInCweByYear(cwe2021, "862")).isNull(); + assertThat(findRuleInCweByYear(cwe2021, "295")).isNull(); assertThat(findRuleInCweByYear(cwe2021, "999")).isNull(); } |