From 443133205a173cc74f55c04cc3d5d8a25644538c Mon Sep 17 00:00:00 2001 From: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com> Date: Fri, 25 Jun 2021 13:56:35 +0200 Subject: [PATCH] SONARJAVA-3884: Update rules metadata (#3668) --- .../l10n/java/rules/java/S1065_java.json | 7 +- .../sonar/l10n/java/rules/java/S106_java.json | 3 + .../l10n/java/rules/java/S1075_java.html | 2 +- .../l10n/java/rules/java/S1075_java.json | 7 +- .../l10n/java/rules/java/S1111_java.json | 3 + .../l10n/java/rules/java/S1113_java.json | 7 +- .../l10n/java/rules/java/S1114_java.json | 3 + .../l10n/java/rules/java/S1116_java.json | 9 +- .../l10n/java/rules/java/S1117_java.json | 8 +- .../l10n/java/rules/java/S1121_java.json | 5 + .../sonar/l10n/java/rules/java/S112_java.json | 3 + .../l10n/java/rules/java/S1143_java.json | 3 + .../l10n/java/rules/java/S1147_java.json | 3 + .../l10n/java/rules/java/S1163_java.json | 7 +- .../l10n/java/rules/java/S1166_java.json | 3 + .../l10n/java/rules/java/S1168_java.json | 8 +- .../l10n/java/rules/java/S1172_java.json | 7 +- .../l10n/java/rules/java/S1174_java.json | 3 + .../l10n/java/rules/java/S1176_java.html | 2 +- .../l10n/java/rules/java/S1181_java.json | 3 + .../l10n/java/rules/java/S1182_java.json | 3 + .../l10n/java/rules/java/S1193_java.json | 7 +- .../l10n/java/rules/java/S1206_java.json | 3 + .../l10n/java/rules/java/S1217_java.json | 3 + .../sonar/l10n/java/rules/java/S121_java.json | 8 +- .../sonar/l10n/java/rules/java/S126_java.json | 8 +- .../sonar/l10n/java/rules/java/S128_java.json | 4 + .../l10n/java/rules/java/S1313_java.json | 3 + .../l10n/java/rules/java/S1314_java.json | 8 +- .../sonar/l10n/java/rules/java/S131_java.json | 3 + .../l10n/java/rules/java/S1444_java.json | 3 + .../l10n/java/rules/java/S1449_java.json | 7 +- .../l10n/java/rules/java/S1656_java.json | 7 +- .../l10n/java/rules/java/S1659_java.json | 8 +- .../l10n/java/rules/java/S1696_java.json | 3 + .../l10n/java/rules/java/S1698_java.json | 4 + .../l10n/java/rules/java/S1699_java.json | 8 +- .../l10n/java/rules/java/S1764_java.json | 7 +- .../l10n/java/rules/java/S1854_java.json | 4 + .../l10n/java/rules/java/S1860_java.json | 7 +- .../l10n/java/rules/java/S1862_java.json | 7 +- .../l10n/java/rules/java/S1872_java.json | 3 + .../l10n/java/rules/java/S1874_java.json | 3 + .../l10n/java/rules/java/S1943_java.json | 8 +- .../l10n/java/rules/java/S1989_java.json | 3 + .../l10n/java/rules/java/S2057_java.json | 7 +- .../l10n/java/rules/java/S2059_java.json | 7 +- .../l10n/java/rules/java/S2061_java.json | 7 +- .../l10n/java/rules/java/S2066_java.json | 7 +- .../l10n/java/rules/java/S2068_java.json | 3 + .../l10n/java/rules/java/S2077_java.json | 3 + .../l10n/java/rules/java/S2093_java.json | 7 +- .../l10n/java/rules/java/S2095_java.json | 4 + .../l10n/java/rules/java/S2111_java.json | 7 +- .../l10n/java/rules/java/S2151_java.json | 7 +- .../l10n/java/rules/java/S2159_java.json | 7 +- .../l10n/java/rules/java/S2162_java.json | 7 +- .../l10n/java/rules/java/S2164_java.json | 7 +- .../l10n/java/rules/java/S2168_java.json | 3 + .../l10n/java/rules/java/S2175_java.json | 7 +- .../l10n/java/rules/java/S2178_java.json | 7 +- .../l10n/java/rules/java/S2184_java.json | 4 + .../l10n/java/rules/java/S2189_java.json | 7 +- .../l10n/java/rules/java/S2197_java.json | 7 +- .../l10n/java/rules/java/S2201_java.json | 8 +- .../l10n/java/rules/java/S2225_java.json | 3 + .../l10n/java/rules/java/S2226_java.json | 7 +- .../l10n/java/rules/java/S2245_java.html | 5 + .../l10n/java/rules/java/S2245_java.json | 18 +- .../l10n/java/rules/java/S2251_java.json | 7 +- .../l10n/java/rules/java/S2259_java.json | 4 + .../l10n/java/rules/java/S2274_java.json | 7 +- .../l10n/java/rules/java/S2275_java.json | 7 +- .../l10n/java/rules/java/S2276_java.json | 7 +- .../l10n/java/rules/java/S2326_java.json | 7 +- .../l10n/java/rules/java/S2384_java.json | 5 + .../l10n/java/rules/java/S2386_java.json | 4 + .../l10n/java/rules/java/S2390_java.json | 7 +- .../l10n/java/rules/java/S2442_java.json | 7 +- .../l10n/java/rules/java/S2445_java.json | 3 + .../l10n/java/rules/java/S2446_java.json | 7 +- .../l10n/java/rules/java/S2447_java.json | 3 + .../l10n/java/rules/java/S2583_java.json | 3 + .../l10n/java/rules/java/S2589_java.json | 3 + .../l10n/java/rules/java/S2612_java.json | 4 + .../l10n/java/rules/java/S2637_java.json | 3 + .../l10n/java/rules/java/S2674_java.json | 7 +- .../l10n/java/rules/java/S2681_java.json | 3 + .../l10n/java/rules/java/S2693_java.json | 7 +- .../l10n/java/rules/java/S2755_java.html | 260 ++++++------------ .../l10n/java/rules/java/S2886_java.json | 7 +- .../l10n/java/rules/java/S3011_java.json | 7 +- .../l10n/java/rules/java/S3014_java.json | 7 +- .../l10n/java/rules/java/S3034_java.json | 7 +- .../l10n/java/rules/java/S3064_java.json | 7 +- .../l10n/java/rules/java/S3067_java.json | 7 +- .../l10n/java/rules/java/S3077_java.json | 7 +- .../l10n/java/rules/java/S3078_java.json | 7 +- .../l10n/java/rules/java/S3329_java.json | 12 +- .../l10n/java/rules/java/S3346_java.json | 7 +- .../l10n/java/rules/java/S3366_java.json | 8 +- .../l10n/java/rules/java/S3457_java.json | 7 +- .../l10n/java/rules/java/S3518_java.json | 4 + .../l10n/java/rules/java/S3551_java.json | 7 +- .../l10n/java/rules/java/S4423_java.json | 9 +- .../l10n/java/rules/java/S4426_java.html | 4 + .../l10n/java/rules/java/S4426_java.json | 6 + .../l10n/java/rules/java/S4512_java.json | 3 + .../l10n/java/rules/java/S4635_java.html | 5 +- .../l10n/java/rules/java/S4790_java.html | 4 + .../l10n/java/rules/java/S4790_java.json | 9 +- .../l10n/java/rules/java/S4830_java.json | 9 + .../l10n/java/rules/java/S4973_java.json | 4 + .../l10n/java/rules/java/S5042_java.json | 3 + .../l10n/java/rules/java/S5320_java.html | 6 +- .../l10n/java/rules/java/S5320_java.json | 9 +- .../l10n/java/rules/java/S5322_java.html | 5 +- .../l10n/java/rules/java/S5322_java.json | 9 +- .../l10n/java/rules/java/S5324_java.html | 8 +- .../l10n/java/rules/java/S5324_java.json | 14 +- .../l10n/java/rules/java/S5332_java.html | 4 + .../l10n/java/rules/java/S5332_java.json | 9 +- .../l10n/java/rules/java/S5443_java.html | 16 +- .../l10n/java/rules/java/S5527_java.json | 9 +- .../l10n/java/rules/java/S5542_java.html | 4 + .../l10n/java/rules/java/S5542_java.json | 13 +- .../l10n/java/rules/java/S5547_java.html | 4 + .../l10n/java/rules/java/S5547_java.json | 13 +- .../l10n/java/rules/java/S5738_java.json | 3 + .../l10n/java/rules/java/S5852_java.html | 1 + .../l10n/java/rules/java/S5852_java.json | 3 +- .../sonar/l10n/java/rules/java/S818_java.json | 8 +- .../sonar/l10n/java/rules/java/S864_java.json | 5 + .../sonar/l10n/java/rules/java/S881_java.json | 9 +- .../sonar/l10n/java/rules/java/S888_java.json | 3 + .../sonar/l10n/java/rules/java/S899_java.json | 7 + .../sonar/l10n/java/rules/java/S923_java.json | 7 +- sonarpedia.json | 2 +- 138 files changed, 801 insertions(+), 276 deletions(-) diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1065_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1065_java.json index 5cd731e39c2..05eb7e95ace 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1065_java.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1065_java.json @@ -13,5 +13,10 @@ "defaultSeverity": "Major", "ruleSpecification": "RSPEC-1065", "sqKey": "S1065", - "scope": "All" + "scope": "All", + "securityStandards": { + "CERT": [ + "MSC12-C." + ] + } } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S106_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S106_java.json index 2e39436a5e1..0c7c3c591ba 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S106_java.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S106_java.json @@ -18,6 +18,9 @@ "securityStandards": { "OWASP": [ "A3" + ], + "CERT": [ + "ERR02-J." ] } } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1075_java.html b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1075_java.html index 39925b53eb1..91c58f63eed 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1075_java.html +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1075_java.html @@ -8,7 +8,7 @@

Noncompliant Code Example

 public class Foo {
   public Collection<User> listUsers() {
-    File userList = new File("/home/mylogin/Dev/users.txt"); // Non-Compliant
+    File userList = new File("/home/mylogin/Dev/users.txt"); // Noncompliant
     Collection<User> users = parse(userList);
     return users;
   }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1075_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1075_java.json
index 6fe3c8dd452..5248c0cb905 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1075_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1075_java.json
@@ -13,5 +13,10 @@
   "defaultSeverity": "Minor",
   "ruleSpecification": "RSPEC-1075",
   "sqKey": "S1075",
-  "scope": "Main"
+  "scope": "Main",
+  "securityStandards": {
+    "CERT": [
+      "MSC03-J."
+    ]
+  }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1111_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1111_java.json
index d0eeee5e65d..db153e53e7f 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1111_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1111_java.json
@@ -17,6 +17,9 @@
   "securityStandards": {
     "CWE": [
       586
+    ],
+    "CERT": [
+      "MET12-J."
     ]
   }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1113_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1113_java.json
index b97a3396ac8..78e033e8889 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1113_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1113_java.json
@@ -13,5 +13,10 @@
   "defaultSeverity": "Critical",
   "ruleSpecification": "RSPEC-1113",
   "sqKey": "ObjectFinalizeOverridenCheck",
-  "scope": "Main"
+  "scope": "Main",
+  "securityStandards": {
+    "CERT": [
+      "MET12-J."
+    ]
+  }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1114_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1114_java.json
index 4442af5526c..57084b05a46 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1114_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1114_java.json
@@ -17,6 +17,9 @@
   "securityStandards": {
     "CWE": [
       568
+    ],
+    "CERT": [
+      "MET12-J."
     ]
   }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1116_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1116_java.json
index fbc2f706c06..35c4b642041 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1116_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1116_java.json
@@ -13,5 +13,12 @@
   "defaultSeverity": "Minor",
   "ruleSpecification": "RSPEC-1116",
   "sqKey": "S1116",
-  "scope": "All"
+  "scope": "All",
+  "securityStandards": {
+    "CERT": [
+      "MSC12-C.",
+      "MSC51-J.",
+      "EXP15-C."
+    ]
+  }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1117_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1117_java.json
index 4de7683f6ad..2e248b1ea4d 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1117_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1117_java.json
@@ -14,5 +14,11 @@
   "defaultSeverity": "Major",
   "ruleSpecification": "RSPEC-1117",
   "sqKey": "S1117",
-  "scope": "All"
+  "scope": "All",
+  "securityStandards": {
+    "CERT": [
+      "DCL51-J.",
+      "DCL01-C."
+    ]
+  }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1121_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1121_java.json
index b6980fd9369..fc5809607de 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1121_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1121_java.json
@@ -18,6 +18,11 @@
   "securityStandards": {
     "CWE": [
       481
+    ],
+    "CERT": [
+      "EXP45-C.",
+      "EXP51-J.",
+      "EXP19-CPP."
     ]
   }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S112_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S112_java.json
index addec823853..b02c9f59710 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S112_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S112_java.json
@@ -18,6 +18,9 @@
   "securityStandards": {
     "CWE": [
       397
+    ],
+    "CERT": [
+      "ERR07-J."
     ]
   }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1143_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1143_java.json
index d76da59c60c..178dbb93de0 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1143_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1143_java.json
@@ -18,6 +18,9 @@
   "securityStandards": {
     "CWE": [
       584
+    ],
+    "CERT": [
+      "ERR04-J."
     ]
   }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1147_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1147_java.json
index 14f1dd1fafc..6adbcf98ad7 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1147_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1147_java.json
@@ -18,6 +18,9 @@
   "securityStandards": {
     "CWE": [
       382
+    ],
+    "CERT": [
+      "ERR09-J."
     ]
   }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1163_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1163_java.json
index 3f595107222..bffc2ba68de 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1163_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1163_java.json
@@ -14,5 +14,10 @@
   "defaultSeverity": "Critical",
   "ruleSpecification": "RSPEC-1163",
   "sqKey": "S1163",
-  "scope": "Main"
+  "scope": "Main",
+  "securityStandards": {
+    "CERT": [
+      "ERR05-J."
+    ]
+  }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1166_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1166_java.json
index d45e9af3ec4..39c93465f50 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1166_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1166_java.json
@@ -23,6 +23,9 @@
     ],
     "OWASP": [
       "A10"
+    ],
+    "CERT": [
+      "ERR00-J."
     ]
   }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1168_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1168_java.json
index c2353d8661f..6c6f3c74793 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1168_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1168_java.json
@@ -12,5 +12,11 @@
   "defaultSeverity": "Major",
   "ruleSpecification": "RSPEC-1168",
   "sqKey": "S1168",
-  "scope": "Main"
+  "scope": "Main",
+  "securityStandards": {
+    "CERT": [
+      "MSC19-C.",
+      "MET55-J."
+    ]
+  }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1172_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1172_java.json
index 866ffcac2de..a1ab3848433 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1172_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1172_java.json
@@ -13,5 +13,10 @@
   "defaultSeverity": "Major",
   "ruleSpecification": "RSPEC-1172",
   "sqKey": "S1172",
-  "scope": "All"
+  "scope": "All",
+  "securityStandards": {
+    "CERT": [
+      "MSC12-C."
+    ]
+  }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1174_java.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1174_java.json
index 7927343213d..0214f535160 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1174_java.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1174_java.json
@@ -17,6 +17,9 @@
   "securityStandards": {
     "CWE": [
       583
+    ],
+    "CERT": [
+      "MET12-J."
     ]
   }
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1176_java.html b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1176_java.html
index 9dc37a97574..4bb11828691 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1176_java.html
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1176_java.html
@@ -13,7 +13,7 @@
   
  • All parameters documented with @param, and names should match.
  • All checked exceptions documented with @throws
  • @return present and documented when not void.
  • -
  • Placeholders like "TODO", "FIXME", "..." should be avoided.
  • +
  • Placeholders like "TODO", "FIXME", "..." should be avoided.
  • The following public methods and constructors are not taken into account by this rule:

    See