Skip to content

Commit

Permalink
SONARJAVA-4075 Update rules metadata (#3845)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpaladin authored Nov 12, 2021
1 parent c0ac2c1 commit f5bb39b
Show file tree
Hide file tree
Showing 277 changed files with 700 additions and 225 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-100",
"sqKey": "S100",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-101",
"sqKey": "S101",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-103",
"sqKey": "S103",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-104",
"sqKey": "S104",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-105",
"sqKey": "S105",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-1066",
"sqKey": "S1066",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-1067",
"sqKey": "S1067",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ <h2>Compliant Solution</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="https://owasp.org/Top10/A09_2021-Security_Logging_and_Monitoring_Failures/">OWASP Top 10 2021 Category A9</a> - Security Logging and
Monitoring Failures </li>
<li> <a href="https://www.owasp.org/index.php/Top_10-2017_A3-Sensitive_Data_Exposure">OWASP Top 10 2017 Category A3</a> - Sensitive Data Exposure
</li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/nzdGBQ">CERT, ERR02-J.</a> - Prevent exceptions while logging data </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
"securityStandards": {
"CERT": [
"ERR02-J."
],
"OWASP": [
"A3"
],
"OWASP Top 10 2021": [
"A9"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-107",
"sqKey": "S107",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-108",
"sqKey": "S108",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ <h2>Exceptions</h2>
ignored, as annotations are often used by injection frameworks, which in exchange require having public fields.</p>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/493.html">MITRE, CWE-493</a> - Critical Public Variable Without Final Modifier </li>
<li> <a href="https://cwe.mitre.org/data/definitions/493.html">MITRE, CWE-493</a> - Critical Public Variable Without Final Modifier </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-1105",
"sqKey": "S1105",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-1110",
"sqKey": "S1110",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h2>Noncompliant Code Example</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/586.html">MITRE, CWE-586</a> - Explicit Call to Finalize() </li>
<li> <a href="https://cwe.mitre.org/data/definitions/586.html">MITRE, CWE-586</a> - Explicit Call to Finalize() </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/4jZGBQ">CERT, MET12-J.</a> - Do not use finalizers </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>Compliant Solution</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/568.html">MITRE, CWE-568</a> - finalize() Method Without super.finalize() </li>
<li> <a href="https://cwe.mitre.org/data/definitions/568.html">MITRE, CWE-568</a> - finalize() Method Without super.finalize() </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/4jZGBQ">CERT, MET12-J.</a> - Do not use finalizers </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-1116",
"sqKey": "S1116",
"scope": "Main",
"scope": "All",
"quickfix": "covered",
"securityStandards": {
"CERT": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-1117",
"sqKey": "S1117",
"scope": "Main",
"scope": "All",
"quickfix": "unknown",
"securityStandards": {
"CERT": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-1119",
"sqKey": "S1119",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h2>Exceptions</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/481.html">MITRE, CWE-481</a> - Assigning instead of Comparing </li>
<li> <a href="https://cwe.mitre.org/data/definitions/481.html">MITRE, CWE-481</a> - Assigning instead of Comparing </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/ZNYxBQ">CERT, EXP45-C.</a> - Do not perform assignments in selection statements </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/ITZGBQ">CERT, EXP51-J.</a> - Do not perform assignments in conditional expressions </li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-1121",
"sqKey": "S1121",
"scope": "Main",
"scope": "All",
"securityStandards": {
"CERT": [
"EXP45-C.",
"EXP51-J.",
"EXP19-CPP."
],
"CWE": [
481
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-1125",
"sqKey": "S1125",
"scope": "Main",
"scope": "All",
"quickfix": "partial"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-1126",
"sqKey": "S1126",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-1128",
"sqKey": "S1128",
"scope": "Main",
"scope": "All",
"quickfix": "covered"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2>Exceptions</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/397.html">MITRE, CWE-397</a> - Declaration of Throws for Generic Exception </li>
<li> <a href="https://cwe.mitre.org/data/definitions/397.html">MITRE, CWE-397</a> - Declaration of Throws for Generic Exception </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/_DdGBQ">CERT, ERR07-J.</a> - Do not throw RuntimeException, Exception, or Throwable </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"securityStandards": {
"CERT": [
"ERR07-J."
],
"CWE": [
397
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ <h2>Noncompliant Code Example</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/546.html">MITRE, CWE-546</a> - Suspicious Comment </li>
<li> <a href="https://cwe.mitre.org/data/definitions/546.html">MITRE, CWE-546</a> - Suspicious Comment </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-1134",
"sqKey": "S1134",
"scope": "Main",
"scope": "All",
"securityStandards": {
"CWE": [
546
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ <h2>Noncompliant Code Example</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/546.html">MITRE, CWE-546</a> - Suspicious Comment </li>
<li> <a href="https://cwe.mitre.org/data/definitions/546.html">MITRE, CWE-546</a> - Suspicious Comment </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"defaultSeverity": "Info",
"ruleSpecification": "RSPEC-1135",
"sqKey": "S1135",
"scope": "Main",
"scope": "All",
"securityStandards": {
"CWE": [
546
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-113",
"sqKey": "S113",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h2>Compliant Solution</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/584.html">MITRE, CWE-584</a> - Return Inside Finally Block </li>
<li> <a href="https://cwe.mitre.org/data/definitions/584.html">MITRE, CWE-584</a> - Return Inside Finally Block </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/BTdGBQ">CERT, ERR04-J.</a> - Do not complete abruptly from a finally block </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-1143",
"sqKey": "S1143",
"scope": "Main",
"scope": "All",
"securityStandards": {
"CERT": [
"ERR04-J."
],
"CWE": [
584
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>Exceptions</h2>
<p>These methods are ignored inside <code>main</code>.</p>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/382.html">MITRE, CWE-382</a> - Use of System.exit() </li>
<li> <a href="https://cwe.mitre.org/data/definitions/382.html">MITRE, CWE-382</a> - Use of System.exit() </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/7zZGBQ">CERT, ERR09-J.</a> - Do not allow untrusted code to terminate the JVM </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"securityStandards": {
"CERT": [
"ERR09-J."
],
"CWE": [
382
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ <h2>Exceptions</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="https://owasp.org/Top10/A09_2021-Security_Logging_and_Monitoring_Failures/">OWASP Top 10 2021 Category A9</a> - Security Logging and
Monitoring Failures </li>
<li> <a href="https://owasp.org/www-project-top-ten/2017/A10_2017-Insufficient_Logging%2526Monitoring">OWASP Top 10 2017 Category A10</a> -
Insufficient Logging &amp; Monitoring </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/xDdGBQ">CERT, ERR00-J.</a> - Do not suppress or ignore checked exceptions </li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
"securityStandards": {
"CERT": [
"ERR00-J."
],
"CWE": [
778
],
"OWASP": [
"A10"
],
"OWASP Top 10 2021": [
"A9"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-1172",
"sqKey": "S1172",
"scope": "Main",
"scope": "All",
"quickfix": "covered",
"securityStandards": {
"CERT": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h2>Noncompliant Code Example</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/583.html">MITRE, CWE-583</a> - finalize() Method Declared Public </li>
<li> <a href="https://cwe.mitre.org/data/definitions/583.html">MITRE, CWE-583</a> - finalize() Method Declared Public </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/4jZGBQ">CERT, MET12-J.</a> - Do not use finalizers </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-117",
"sqKey": "S117",
"scope": "Main",
"scope": "All",
"quickfix": "unknown"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h2>Compliant Solution</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/396.html">MITRE, CWE-396</a> - Declaration of Catch for Generic Exception </li>
<li> <a href="https://cwe.mitre.org/data/definitions/396.html">MITRE, CWE-396</a> - Declaration of Catch for Generic Exception </li>
<li> <a href="https://github.com/isocpp/CppCoreGuidelines/blob/036324/CppCoreGuidelines.md#Re-exception-types">C++ Core Guidelines E.14</a> - Use
purpose-designed user-defined types as exceptions (not built-in types) </li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h2>Compliant Solution</h2>
</pre>
<h2>See</h2>
<ul>
<li> <a href="http://cwe.mitre.org/data/definitions/580.html">MITRE, CWE-580</a> - clone() Method Without super.clone() </li>
<li> <a href="https://cwe.mitre.org/data/definitions/580.html">MITRE, CWE-580</a> - clone() Method Without super.clone() </li>
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/FjZGBQ">CERT, MET53-J.</a> - Ensure that the clone() method calls super.clone() </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-1186",
"sqKey": "S1186",
"scope": "Main",
"scope": "All",
"quickfix": "covered"
}
Loading

0 comments on commit f5bb39b

Please sign in to comment.