]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-15345 Fixed the numbers of CWEs for 2021
authorLukasz Jarocki <lukasz.jarocki@sonarsource.com>
Mon, 30 Aug 2021 14:54:28 +0000 (16:54 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 30 Aug 2021 20:08:20 +0000 (20:08 +0000)
server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java
server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java

index d895b0bc221b75ad7fabf1bab1d116483bb09a64..137aea7497a8e8c8c50a799d426e64b9d19036a3 100644 (file)
@@ -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,
index e7c6c8dab8665cc474c173be43a77f8cf203faa3..eaf2b49080dfc862899dbeb08bd718dd8e4c395d 100644 (file)
@@ -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();
   }