Skip to content

Commit 9dd9765

Browse files
SONARPHP-1633 Fix discrepancies between MQR and severity for PHP rules (#1380)
1 parent 3852234 commit 9dd9765

22 files changed

+10
-87
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=org.sonarsource.php
2-
version=3.42-SNAPSHOT
2+
version=3.42.1-SNAPSHOT
33
description=SonarSource PHP Analyzer
44
org.gradle.parallel=false
55
org.gradle.caching=true

php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1135.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "CODE_SMELL",
44
"code": {
55
"impacts": {
6-
"MAINTAINABILITY": "LOW"
6+
"MAINTAINABILITY": "INFO"
77
},
88
"attribute": "COMPLETE"
99
},

php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S2115.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "VULNERABILITY",
44
"code": {
55
"impacts": {
6-
"SECURITY": "HIGH"
6+
"SECURITY": "BLOCKER"
77
},
88
"attribute": "TRUSTWORTHY"
99
},

php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S2245.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,10 @@ <h2>See</h2>
4949
<li> OWASP - <a href="https://owasp.org/Top10/A02_2021-Cryptographic_Failures/">Top 10 2021 Category A2 - Cryptographic Failures</a> </li>
5050
<li> OWASP - <a href="https://owasp.org/www-project-top-ten/2017/A3_2017-Sensitive_Data_Exposure">Top 10 2017 Category A3 - Sensitive Data
5151
Exposure</a> </li>
52-
<li> OWASP - <a href="https://mas.owasp.org/checklists/MASVS-CRYPTO/">Mobile AppSec Verification Standard - Cryptography Requirements</a> </li>
53-
<li> OWASP - <a href="https://owasp.org/www-project-mobile-top-10/2016-risks/m5-insufficient-cryptography">Mobile Top 10 2016 Category M5 -
54-
Insufficient Cryptography</a> </li>
5552
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/338">CWE-338 - Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)</a>
5653
</li>
5754
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/330">CWE-330 - Use of Insufficiently Random Values</a> </li>
5855
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/326">CWE-326 - Inadequate Encryption Strength</a> </li>
5956
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/1241">CWE-1241 - Use of Predictable Algorithm in Random Number Generator</a> </li>
60-
<li> Derived from FindSecBugs rule <a href="https://h3xstream.github.io/find-sec-bugs/bugs.htm#PREDICTABLE_RANDOM">Predictable Pseudo Random Number
61-
Generator</a> </li>
6257
</ul>
6358

php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S2245.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
"OWASP": [
3030
"A3"
3131
],
32-
"OWASP Mobile": [
33-
"M5"
34-
],
35-
"MASVS": [
36-
"MSTG-CRYPTO-6"
37-
],
3832
"OWASP Top 10 2021": [
3933
"A2"
4034
],

php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S2755.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "VULNERABILITY",
44
"code": {
55
"impacts": {
6-
"SECURITY": "HIGH"
6+
"SECURITY": "BLOCKER"
77
},
88
"attribute": "COMPLETE"
99
},

php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4423.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@
3030
"A3",
3131
"A6"
3232
],
33-
"OWASP Mobile": [
34-
"M3"
35-
],
36-
"MASVS": [
37-
"MSTG-NETWORK-2"
38-
],
3933
"OWASP Top 10 2021": [
4034
"A2",
4135
"A7"

php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4426.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ <h3>How does this work?</h3>
7373
<h4>RSA (Rivest-Shamir-Adleman) and DSA (Digital Signature Algorithm)</h4>
7474
<p>The security of these algorithms depends on the difficulty of attacks attempting to solve their underlying mathematical problem.</p>
7575
<p>In general, a minimum key size of <strong>2048</strong> bits is recommended for both. It provides 112 bits of security. A key length of
76-
<strong>3072</strong> or <strong>4092</strong> should be preferred when possible.</p>
76+
<strong>3072</strong> or <strong>4096</strong> should be preferred when possible.</p>
7777
<h4>AES (Advanced Encryption Standard)</h4>
7878
<p>AES supports three key sizes: 128 bits, 192 bits and 256 bits. The security of the AES algorithm is based on the computational complexity of trying
7979
all possible keys.<br> A larger key size increases the number of possible keys and makes exhaustive search attacks computationally infeasible.
@@ -127,9 +127,6 @@ <h3>Standards</h3>
127127
Exposure</a> </li>
128128
<li> OWASP - <a href="https://owasp.org/www-project-top-ten/2017/A6_2017-Security_Misconfiguration">Top 10 2017 Category A6 - Security
129129
Misconfiguration</a> </li>
130-
<li> OWASP - <a href="https://mas.owasp.org/checklists/MASVS-CRYPTO/">Mobile AppSec Verification Standard - Cryptography Requirements</a> </li>
131-
<li> OWASP - <a href="https://owasp.org/www-project-mobile-top-10/2016-risks/m5-insufficient-cryptography">Mobile Top 10 2016 Category M5 -
132-
Insufficient Cryptography</a> </li>
133130
<li> <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar1.pdf">NIST 800-131A</a> - Recommendation for Transitioning the
134131
Use of Cryptographic Algorithms and Key Lengths </li>
135132
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/326">CWE-326 - Inadequate Encryption Strength</a> </li>

php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4426.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@
2828
"A3",
2929
"A6"
3030
],
31-
"OWASP Mobile": [
32-
"M5"
33-
],
34-
"MASVS": [
35-
"MSTG-CRYPTO-3"
36-
],
3731
"OWASP Top 10 2021": [
3832
"A2"
3933
],

php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4790.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ <h2>See</h2>
3434
Exposure</a> </li>
3535
<li> OWASP - <a href="https://owasp.org/www-project-top-ten/2017/A6_2017-Security_Misconfiguration">Top 10 2017 Category A6 - Security
3636
Misconfiguration</a> </li>
37-
<li> OWASP - <a href="https://mas.owasp.org/checklists/MASVS-CRYPTO/">Mobile AppSec Verification Standard - Cryptography Requirements</a> </li>
38-
<li> OWASP - <a href="https://owasp.org/www-project-mobile-top-10/2016-risks/m5-insufficient-cryptography">Mobile Top 10 2016 Category M5 -
39-
Insufficient Cryptography</a> </li>
4037
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/1240">CWE-1240 - Use of a Risky Cryptographic Primitive</a> </li>
4138
</ul>
4239

0 commit comments

Comments
 (0)