From 482f7d2e43d2d6f6e777e56386e6591f7a44bcfb Mon Sep 17 00:00:00 2001 From: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com> Date: Mon, 16 Aug 2021 14:56:41 +0200 Subject: [PATCH] Update rule metdata for version 3.19 (#815) --- .../org/sonar/l10n/php/rules/php/S1066.html | 2 +- .../org/sonar/l10n/php/rules/php/S1067.html | 2 +- .../org/sonar/l10n/php/rules/php/S1075.html | 4 +- .../org/sonar/l10n/php/rules/php/S1075.json | 4 +- .../org/sonar/l10n/php/rules/php/S110.html | 4 +- .../org/sonar/l10n/php/rules/php/S1105.html | 2 +- .../org/sonar/l10n/php/rules/php/S1109.html | 2 +- .../org/sonar/l10n/php/rules/php/S1110.html | 2 +- .../org/sonar/l10n/php/rules/php/S1117.html | 2 +- .../org/sonar/l10n/php/rules/php/S1121.html | 2 +- .../org/sonar/l10n/php/rules/php/S1131.html | 2 +- .../org/sonar/l10n/php/rules/php/S1134.json | 4 + .../org/sonar/l10n/php/rules/php/S1135.json | 4 + .../org/sonar/l10n/php/rules/php/S1142.html | 2 +- .../org/sonar/l10n/php/rules/php/S1145.html | 2 +- .../org/sonar/l10n/php/rules/php/S1226.json | 6 +- .../org/sonar/l10n/php/rules/php/S126.json | 4 +- .../org/sonar/l10n/php/rules/php/S1264.html | 2 +- .../org/sonar/l10n/php/rules/php/S127.html | 2 +- .../org/sonar/l10n/php/rules/php/S128.html | 2 +- .../org/sonar/l10n/php/rules/php/S131.html | 2 +- .../org/sonar/l10n/php/rules/php/S1311.json | 4 +- .../org/sonar/l10n/php/rules/php/S1313.html | 8 +- .../org/sonar/l10n/php/rules/php/S134.html | 2 +- .../org/sonar/l10n/php/rules/php/S138.html | 2 +- .../org/sonar/l10n/php/rules/php/S1451.html | 2 +- .../org/sonar/l10n/php/rules/php/S1451.json | 4 +- .../org/sonar/l10n/php/rules/php/S1523.html | 4 +- .../org/sonar/l10n/php/rules/php/S1578.html | 2 +- .../org/sonar/l10n/php/rules/php/S1599.html | 2 +- .../org/sonar/l10n/php/rules/php/S1600.html | 40 +++-- .../org/sonar/l10n/php/rules/php/S1603.html | 2 +- .../org/sonar/l10n/php/rules/php/S1656.json | 4 +- .../org/sonar/l10n/php/rules/php/S1697.json | 4 +- .../org/sonar/l10n/php/rules/php/S1751.json | 4 +- .../org/sonar/l10n/php/rules/php/S1757.json | 2 +- .../org/sonar/l10n/php/rules/php/S1763.html | 2 +- .../org/sonar/l10n/php/rules/php/S1764.json | 4 +- .../org/sonar/l10n/php/rules/php/S1765.html | 4 +- .../org/sonar/l10n/php/rules/php/S1780.json | 2 +- .../org/sonar/l10n/php/rules/php/S1788.html | 2 +- .../org/sonar/l10n/php/rules/php/S1799.html | 2 +- .../org/sonar/l10n/php/rules/php/S1799.json | 4 +- .../org/sonar/l10n/php/rules/php/S1848.json | 4 +- .../org/sonar/l10n/php/rules/php/S1854.html | 2 +- .../org/sonar/l10n/php/rules/php/S1862.html | 6 +- .../org/sonar/l10n/php/rules/php/S1871.html | 4 +- .../org/sonar/l10n/php/rules/php/S1998.html | 8 +- .../org/sonar/l10n/php/rules/php/S2000.json | 2 +- .../org/sonar/l10n/php/rules/php/S2001.html | 146 ++++++++++-------- .../org/sonar/l10n/php/rules/php/S2002.html | 2 +- .../org/sonar/l10n/php/rules/php/S2003.html | 2 +- .../org/sonar/l10n/php/rules/php/S2003.json | 4 +- .../org/sonar/l10n/php/rules/php/S2007.html | 2 +- .../org/sonar/l10n/php/rules/php/S2010.json | 2 +- .../org/sonar/l10n/php/rules/php/S2011.html | 2 +- .../org/sonar/l10n/php/rules/php/S2014.json | 4 +- .../org/sonar/l10n/php/rules/php/S2036.html | 2 +- .../org/sonar/l10n/php/rules/php/S2044.html | 2 +- .../org/sonar/l10n/php/rules/php/S2050.html | 78 +++++----- .../org/sonar/l10n/php/rules/php/S2068.html | 6 +- .../org/sonar/l10n/php/rules/php/S2070.json | 4 +- .../org/sonar/l10n/php/rules/php/S2077.html | 2 +- .../org/sonar/l10n/php/rules/php/S2092.html | 6 +- .../org/sonar/l10n/php/rules/php/S2187.html | 2 +- .../org/sonar/l10n/php/rules/php/S2201.html | 4 +- .../org/sonar/l10n/php/rules/php/S2201.json | 4 +- .../org/sonar/l10n/php/rules/php/S2234.json | 4 +- .../org/sonar/l10n/php/rules/php/S2245.html | 5 + .../org/sonar/l10n/php/rules/php/S2245.json | 6 +- .../org/sonar/l10n/php/rules/php/S2251.html | 2 +- .../org/sonar/l10n/php/rules/php/S2251.json | 4 +- .../org/sonar/l10n/php/rules/php/S2255.html | 2 +- .../org/sonar/l10n/php/rules/php/S2255.json | 4 +- .../org/sonar/l10n/php/rules/php/S2612.html | 2 +- .../org/sonar/l10n/php/rules/php/S2699.html | 2 +- .../org/sonar/l10n/php/rules/php/S2737.html | 2 +- .../org/sonar/l10n/php/rules/php/S2755.html | 53 ++++--- .../org/sonar/l10n/php/rules/php/S2757.json | 6 +- .../org/sonar/l10n/php/rules/php/S2761.json | 4 +- .../org/sonar/l10n/php/rules/php/S2830.html | 2 +- .../org/sonar/l10n/php/rules/php/S2918.html | 6 +- .../org/sonar/l10n/php/rules/php/S2964.json | 4 +- .../org/sonar/l10n/php/rules/php/S3011.json | 4 +- .../org/sonar/l10n/php/rules/php/S3330.html | 6 +- .../org/sonar/l10n/php/rules/php/S3331.html | 4 +- .../org/sonar/l10n/php/rules/php/S3331.json | 4 +- .../org/sonar/l10n/php/rules/php/S3333.html | 2 +- .../org/sonar/l10n/php/rules/php/S3334.html | 2 +- .../org/sonar/l10n/php/rules/php/S3336.html | 8 +- .../org/sonar/l10n/php/rules/php/S3337.html | 2 +- .../org/sonar/l10n/php/rules/php/S3338.html | 2 +- .../org/sonar/l10n/php/rules/php/S3338.json | 4 +- .../org/sonar/l10n/php/rules/php/S3358.html | 2 +- .../org/sonar/l10n/php/rules/php/S3699.json | 6 +- .../org/sonar/l10n/php/rules/php/S3801.html | 2 +- .../org/sonar/l10n/php/rules/php/S3923.html | 2 +- .../org/sonar/l10n/php/rules/php/S3923.json | 4 +- .../org/sonar/l10n/php/rules/php/S3981.html | 4 +- .../org/sonar/l10n/php/rules/php/S3981.json | 4 +- .../org/sonar/l10n/php/rules/php/S4142.json | 4 +- .../org/sonar/l10n/php/rules/php/S4423.html | 4 + .../org/sonar/l10n/php/rules/php/S4423.json | 3 +- .../org/sonar/l10n/php/rules/php/S4426.html | 10 +- .../org/sonar/l10n/php/rules/php/S4426.json | 3 +- .../org/sonar/l10n/php/rules/php/S4433.html | 2 +- .../org/sonar/l10n/php/rules/php/S4502.html | 4 +- .../org/sonar/l10n/php/rules/php/S4508.html | 10 +- .../org/sonar/l10n/php/rules/php/S4508.json | 4 +- .../org/sonar/l10n/php/rules/php/S4524.json | 4 +- .../org/sonar/l10n/php/rules/php/S4784.html | 8 +- .../org/sonar/l10n/php/rules/php/S4784.json | 6 +- .../org/sonar/l10n/php/rules/php/S4787.html | 8 +- .../org/sonar/l10n/php/rules/php/S4787.json | 4 +- .../org/sonar/l10n/php/rules/php/S4790.html | 8 +- .../org/sonar/l10n/php/rules/php/S4790.json | 3 +- .../org/sonar/l10n/php/rules/php/S4792.html | 10 +- .../org/sonar/l10n/php/rules/php/S4818.json | 4 +- .../org/sonar/l10n/php/rules/php/S4823.json | 4 +- .../org/sonar/l10n/php/rules/php/S4828.html | 4 +- .../org/sonar/l10n/php/rules/php/S4829.html | 2 +- .../org/sonar/l10n/php/rules/php/S4829.json | 4 +- .../org/sonar/l10n/php/rules/php/S4830.html | 8 +- .../org/sonar/l10n/php/rules/php/S4830.json | 3 +- .../org/sonar/l10n/php/rules/php/S4833.html | 4 +- .../org/sonar/l10n/php/rules/php/S4834.html | 8 +- .../org/sonar/l10n/php/rules/php/S4834.json | 4 +- .../org/sonar/l10n/php/rules/php/S5042.html | 4 +- .../org/sonar/l10n/php/rules/php/S5122.html | 2 +- .../org/sonar/l10n/php/rules/php/S5328.html | 7 +- .../org/sonar/l10n/php/rules/php/S5328.json | 3 +- .../org/sonar/l10n/php/rules/php/S5332.html | 6 + .../org/sonar/l10n/php/rules/php/S5332.json | 6 - .../org/sonar/l10n/php/rules/php/S5527.html | 12 +- .../org/sonar/l10n/php/rules/php/S5527.json | 3 +- .../org/sonar/l10n/php/rules/php/S5542.html | 22 +-- .../org/sonar/l10n/php/rules/php/S5542.json | 7 +- .../org/sonar/l10n/php/rules/php/S5547.html | 2 +- .../org/sonar/l10n/php/rules/php/S5547.json | 7 +- .../org/sonar/l10n/php/rules/php/S5632.json | 4 +- .../org/sonar/l10n/php/rules/php/S5693.html | 2 +- .../org/sonar/l10n/php/rules/php/S5779.json | 4 + .../org/sonar/l10n/php/rules/php/S5783.json | 4 + .../org/sonar/l10n/php/rules/php/S5785.html | 2 +- .../org/sonar/l10n/php/rules/php/S5785.json | 4 + .../org/sonar/l10n/php/rules/php/S5808.html | 2 +- .../org/sonar/l10n/php/rules/php/S5863.html | 2 +- .../org/sonar/l10n/php/rules/php/S5876.html | 2 +- .../org/sonar/l10n/php/rules/php/S5899.html | 4 +- .../org/sonar/l10n/php/rules/php/S881.json | 4 +- .../org/sonar/l10n/php/rules/php/S930.json | 7 +- sonarpedia.json | 2 +- 152 files changed, 455 insertions(+), 443 deletions(-) diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1066.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1066.html index a214367499..9271e2689d 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1066.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1066.html @@ -1,4 +1,4 @@ -

Merging collapsible if statements increases the code's readability.

+

Merging collapsible if statements increases the code’s readability.

Noncompliant Code Example

 if (condition1) {
diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1067.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1067.html
index 71a2a57ce6..891574fa06 100644
--- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1067.html
+++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1067.html
@@ -1,6 +1,6 @@
 

The complexity of an expression is defined by the number of &&, || and condition ? ifTrue : ifFalse operators it contains.

-

A single expression's complexity should not become too high to keep the code readable.

+

A single expression’s complexity should not become too high to keep the code readable.

Noncompliant Code Example

With the default threshold value of 3

diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1075.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1075.html
index 638640771d..1e2d730c75 100644
--- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1075.html
+++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1075.html
@@ -1,9 +1,9 @@
 

Hard coding a URI makes it difficult to test a program: path literals are not always portable across operating systems, a given absolute path may not exist on a specific test environment, a specified Internet URL may not be available when executing the tests, production environment filesystems -usually differ from the development environment, ...etc. For all those reasons, a URI should never be hard coded. Instead, it should be replaced by +usually differ from the development environment, …​etc. For all those reasons, a URI should never be hard coded. Instead, it should be replaced by customizable parameter.

Further even if the elements of a URI are obtained dynamically, portability can still be limited if the path-delimiters are hard-coded.

-

This rule raises an issue when URI's or path delimiters are hard coded.

+

This rule raises an issue when URI’s or path delimiters are hard coded.

See

Exceptions

-

When blocks are inlined (left and right curly braces on the same line), no issue is triggered.

+

When blocks are inlined (left and right curly braces on the same line), no issue is triggered.

 if(condition) {doSomething();}
 
diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1109.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1109.html index 3c4039f9bb..95698c23d4 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1109.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1109.html @@ -12,7 +12,7 @@

Compliant Solution

}

Exceptions

-

When blocks are inlined (open and close curly braces on the same line), no issue is triggered.

+

When blocks are inlined (open and close curly braces on the same line), no issue is triggered.

 if(condition) {doSomething();}
 
diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1110.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1110.html index 2e10cf7e7f..b927fe0349 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1110.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1110.html @@ -1,5 +1,5 @@

The use of parentheses, even those not required to enforce a desired order of operations, can clarify the intent behind a piece of code. But -redundant pairs of parentheses could be misleading, and should be removed.

+redundant pairs of parentheses could be misleading, and should be removed.

Noncompliant Code Example

 $x = ($y / 2 + 1); // Compliant even if the parenthesis are ignored by the compiler
diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1117.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1117.html
index a2d462dc21..0beb73d463 100644
--- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1117.html
+++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1117.html
@@ -1,5 +1,5 @@
 

Overriding or shadowing a variable declared in an outer scope can strongly impact the readability, and therefore the maintainability, of a piece of -code. Further, it could lead maintainers to introduce bugs because they think they're using one variable but are really using another.

+code. Further, it could lead maintainers to introduce bugs because they think they’re using one variable but are really using another.

Noncompliant Code Example

 class Foo {
diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1121.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1121.html
index 7b5071d9f3..c0e2d68b67 100644
--- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1121.html
+++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1121.html
@@ -11,7 +11,7 @@ 

Compliant Solution

if ($val && check()) { }
-

or

+

or

 if ($val == value() && check()) { // Perhaps in fact the equality operator was expected
 }
diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1131.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1131.html
index 642072f955..c69359385a 100644
--- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1131.html
+++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1131.html
@@ -1,7 +1,7 @@
 

Trailing whitespaces are simply useless and should not stay in code. They may generate noise when comparing different versions of the same file.

If you encounter issues from this rule, this probably means that you are not using an automated code formatter - which you should if you have the -opportunity to do so.

+opportunity to do so.

Exceptions

Lines containing only whitespaces.

diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1134.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1134.json index ad51186f5a..ebf8149c01 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1134.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1134.json @@ -2,6 +2,10 @@ "title": "Track uses of \"FIXME\" tags", "type": "CODE_SMELL", "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "0min" + }, "tags": [ "cwe" ], diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1135.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1135.json index b1a76c6603..651fb0d171 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1135.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1135.json @@ -2,6 +2,10 @@ "title": "Track uses of \"TODO\" tags", "type": "CODE_SMELL", "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "0min" + }, "tags": [ "cwe" ], diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1142.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1142.html index 9a98800d9d..d746c59785 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1142.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1142.html @@ -1,4 +1,4 @@ -

Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a +

Having too many return statements in a function increases the function’s essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

Noncompliant Code Example

With the default threshold of 3:

diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1145.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1145.html index 20ae33264a..c16a874146 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1145.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S1145.html @@ -1,6 +1,6 @@

if statements with conditions that are always false have the effect of making blocks of code non-functional. if statements with conditions that are always true are completely redundant, and make the code less readable.

-

There are three possible causes for the presence of such code:

+

There are three possible causes for the presence of such code:

-

Today's services have an ever-changing architecture due to their scaling and redundancy needs. It is a mistake to think that a service will always +

Today’s services have an ever-changing architecture due to their scaling and redundancy needs. It is a mistake to think that a service will always have the same IP address. When it does change, the hardcoded IP will have to be modified too. This will have an impact on the product development, delivery, and deployment:

Sensitive Code Example

Builtin functions

diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4787.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4787.json index 5b617c7cdf..7cf33bb370 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4787.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4787.json @@ -2,9 +2,7 @@ "title": "Encrypting data is security-sensitive", "type": "SECURITY_HOTSPOT", "status": "deprecated", - "tags": [ - - ], + "tags": [], "defaultSeverity": "Critical", "ruleSpecification": "RSPEC-4787", "sqKey": "S4787", diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4790.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4790.html index 3de99e85b9..f2f99e53ea 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4790.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4790.html @@ -6,12 +6,12 @@

Ask Yourself Whether

The hashed value is used in a security context like:

There is a risk if you answered yes to any of those questions.

Recommended Secure Coding Practices

-

Safer alternatives, such as SHA-256, SHA-512, SHA-3 are recommended, and for password hashing, it's even +

Safer alternatives, such as SHA-256, SHA-512, SHA-3 are recommended, and for password hashing, it’s even better to use algorithms that do not compute too "quickly", like bcrypt, scrypt, argon2 or pbkdf2 because it slows down brute force attacks.

Sensitive Code Example

@@ -33,6 +33,10 @@

See

  • OWASP Top 10 2017 Category A6 - Security Misconfiguration
  • +
  • Mobile AppSec + Verification Standard - Cryptography Requirements
  • +
  • OWASP Mobile Top 10 2016 Category M5 - + Insufficient Cryptography
  • MITRE, CWE-327 - Use of a Broken or Risky Cryptographic Algorithm
  • MITRE, CWE-916 - Use of Password Hash With Insufficient Computational Effort
  • diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4790.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4790.json index 48d5988850..9c5b4798c4 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4790.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4790.json @@ -7,7 +7,8 @@ "spring", "owasp-a6", "sans-top25-porous", - "owasp-a3" + "owasp-a3", + "owasp-m5" ], "defaultSeverity": "Critical", "ruleSpecification": "RSPEC-4790", diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4792.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4792.html index a8a4190f50..e1fca43418 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4792.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4792.html @@ -28,7 +28,7 @@

    Ask Yourself Whether

    There is a risk if you answered yes to any of those questions.

    Recommended Secure Coding Practices

    -

    Remember that configuring loggers properly doesn't make them bullet-proof. Here is a list of recommendations explaining on how to use your +

    Remember that configuring loggers properly doesn’t make them bullet-proof. Here is a list of recommendations explaining on how to use your logs:

    -

    See:

    +

    See

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4829.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4829.json index 56c25bda46..c1ff468c55 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4829.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4829.json @@ -2,9 +2,7 @@ "title": "Reading the Standard Input is security-sensitive", "type": "SECURITY_HOTSPOT", "status": "deprecated", - "tags": [ - - ], + "tags": [], "defaultSeverity": "Critical", "ruleSpecification": "RSPEC-4829", "sqKey": "S4829", diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4830.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4830.html index ef41fc1c63..69f4f15768 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4830.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4830.html @@ -1,11 +1,11 @@ -

    Validation of X.509 certificates is essential to create secure SSL/TLS sessions not vulnerable to man-in-the-middle attacks.

    +

    Validation of X.509 certificates is essential to create secure SSL/TLS sessions not vulnerable to man-in-the-middle attacks.

    The certificate chain validation includes these steps:

    -

    It's not recommended to reinvent the wheel by implementing custom certificate chain validation.

    +

    It’s not recommended to reinvent the wheel by implementing custom certificate chain validation.

    TLS libraries provide built-in certificate validation functions that should be used.

    Noncompliant Code Example

    @@ -23,6 +23,10 @@ 

    See

  • OWASP Top 10 2017 Category A6 - Security Misconfiguration
  • +
  • Mobile AppSec Verification + Standard - Network Communication Requirements
  • +
  • OWASP Mobile Top 10 2016 Category M3 - Insecure + Communication
  • MITRE, CWE-295 - Improper Certificate Validation
  • diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4830.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4830.json index a5efd016de..3355d54bda 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4830.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4830.json @@ -11,7 +11,8 @@ "privacy", "owasp-a6", "ssl", - "owasp-a3" + "owasp-a3", + "owasp-m3" ], "defaultSeverity": "Critical", "ruleSpecification": "RSPEC-4830", diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4833.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4833.html index 99dc92b0e8..62d19a3067 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4833.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4833.html @@ -5,7 +5,7 @@
  • it provides the ability to create alias which improve readability of the code
  • Starting from its version 8, Drupal is relying on namespaces to be compliant with PSR-4 standard. Drupal's modules should be compliant with +href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md">PSR-4 standard. Drupal’s modules should be compliant with PSR-4 standard and therefore should no longer rely on include or include_once or require or require_once functions.

    Noncompliant Code Example

    @@ -17,5 +17,5 @@

    Compliant Solution

    use Drupal\vegetable\Entity\Tomato

    Exceptions

    -

    This rule doesn't raise issues on autoload.php or ScriptHandler.php files.

    +

    This rule doesn’t raise issues on autoload.php or ScriptHandler.php files.

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4834.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4834.html index 8067f7dd7c..7384e4b36a 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4834.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4834.html @@ -7,12 +7,12 @@

    Granting correct permissions to users, applications, groups or roles and defining required permissions that allow access to a resource is sensitive, must therefore be done with care. For instance, it is obvious that only users with administrator privilege should be authorized to -add/remove the administrator permission of another user.

    +add/remove the administrator permission of another user.

    Ask Yourself Whether

    There is a risk if you answered yes to any of those questions.

    @@ -22,8 +22,8 @@

    Recommended Secure Coding Practices

  • Use a well-defined access control model like RBAC or ACL.
  • Entities' permissions should be reviewed regularly to remove permissions that are no longer needed.
  • -
  • Respect the principle of least privilege ("_an entity has access only - the information and resources that are necessary for its legitimate purpose_").
  • +
  • Respect the principle of least privilege ("an entity has access + only the information and resources that are necessary for its legitimate purpose").
  • Sensitive Code Example

    CakePHP

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4834.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4834.json index 8c7a0ff071..5d30d450ca 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4834.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S4834.json @@ -2,9 +2,7 @@ "title": "Controlling permissions is security-sensitive", "type": "SECURITY_HOTSPOT", "status": "deprecated", - "tags": [ - - ], + "tags": [], "defaultSeverity": "Minor", "ruleSpecification": "RSPEC-4834", "sqKey": "S4834", diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5042.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5042.html index bb40071cdb..b183b76498 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5042.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5042.html @@ -1,7 +1,7 @@

    Successful Zip Bomb attacks occur when an application expands untrusted archive files without controlling the size of the expanded data, which can lead to denial of service. A Zip bomb is usually a malicious archive file of a few kilobytes of compressed data but turned into gigabytes of uncompressed data. To achieve this extreme compression ratio, attackers will -compress irrelevant data (eg: a long string of repeated bytes).

    +compress irrelevant data (eg: a long string of repeated bytes).

    Ask Yourself Whether

    Archives to expand are untrusted and:

    Sensitive Code Example

    For ZipArchive module:

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5122.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5122.html index e1d015a85f..5a156a337f 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5122.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5122.html @@ -10,7 +10,7 @@ / relax the same origin policy.

    Ask Yourself Whether

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5328.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5328.json index 09da8f8fe2..f4ebcf21aa 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5328.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5328.json @@ -16,7 +16,8 @@ "scope": "All", "securityStandards": { "CWE": [ - 330 + 330, + 340 ], "OWASP": [ "A6" diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5332.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5332.html index aac67e9b70..6ef348209d 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5332.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5332.html @@ -42,6 +42,9 @@

    Sensitive Code Example

    $trans = (new Swift_SmtpTransport('XXX', 1234)); // Sensitive $mailer = new PHPMailer(true); // Sensitive + +define( 'FORCE_SSL_ADMIN', false); // Sensitive +define( 'FORCE_SSL_LOGIN', false); // Sensitive

    Compliant Solution

    @@ -57,6 +60,9 @@ 

    Compliant Solution

    $mailer = new PHPMailer(true); $mailer->SMTPSecure = 'tls'; // Compliant + +define( 'FORCE_SSL_ADMIN', true); // Compliant +define( 'FORCE_SSL_LOGIN', true); // Compliant

    Exceptions

    No issue is reported for the following cases because they are not considered sensitive:

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5332.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5332.json index 52063608be..ec4db6e889 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5332.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5332.json @@ -18,12 +18,6 @@ ], "OWASP": [ "A3" - ], - "OWASP Mobile": [ - "M3" - ], - "MASVS": [ - "MSTG-NETWORK-1" ] } } diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5527.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5527.html index 216cc1a320..d09efa2ac2 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5527.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5527.html @@ -1,7 +1,7 @@ -

    To establish a SSL/TLS connection not vulnerable to man-in-the-middle attacks, it's essential to make sure the server presents the right -certificate.

    -

    The certificate's hostname-specific data should match the server hostname.

    -

    It's not recommended to re-invent the wheel by implementing custom hostname verification.

    +

    To establish a SSL/TLS connection not vulnerable to man-in-the-middle attacks, it’s essential to make sure the server presents the right +certificate.

    +

    The certificate’s hostname-specific data should match the server hostname.

    +

    It’s not recommended to re-invent the wheel by implementing custom hostname verification.

    TLS/SSL libraries provide built-in hostname verification functions that should be used.

    Noncompliant Code Example

    @@ -19,6 +19,10 @@ 

    See

  • OWASP Top 10 2017 Category A6 - Security Misconfiguration
  • +
  • Mobile AppSec Verification + Standard - Network Communication Requirements
  • +
  • OWASP Mobile Top 10 2016 Category M3 - Insecure + Communication
  • MITRE, CWE-297 - Improper Validation of Certificate with Host Mismatch
  • diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5527.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5527.json index 81cb79edaa..1e77af7ce0 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5527.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5527.json @@ -11,7 +11,8 @@ "privacy", "owasp-a6", "ssl", - "owasp-a3" + "owasp-a3", + "owasp-m3" ], "defaultSeverity": "Critical", "ruleSpecification": "RSPEC-5527", diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5542.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5542.html index 65e28d6fa0..d771c410be 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5542.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5542.html @@ -1,16 +1,16 @@

    Encryption operation mode and the padding scheme should be chosen appropriately to guarantee data confidentiality, integrity and authenticity:

    -

    the GCM (Galois Counter Mode) mode which works -internally with zero/no padding scheme, is recommended, as it is designed to provide both data authenticity (integrity) and confidentiality. Other -similar modes are CCM, CWC, EAX, IAPM and OCB.

    -

    the CBC (Cipher Block Chaining) mode by itself provides only data confidentiality, it's recommended to use it along with Message -Authentication Code or similar to achieve data authenticity (integrity) too and thus to prevent padding oracle attacks.

    -

    the ECB (Electronic Codebook) mode doesn't provide serious message confidentiality: under a given key any given plaintext block -always gets encrypted to the same ciphertext block. This mode should not be used.

    -

    Noncompliant Code Example

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5542.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5542.json index d47f30573f..ebf36f8ca2 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5542.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5542.json @@ -2,12 +2,17 @@ "title": "Encryption algorithms should be used with secure mode and padding scheme", "type": "VULNERABILITY", "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "20min" + }, "tags": [ "cwe", "privacy", "owasp-a6", "sans-top25-porous", - "owasp-a3" + "owasp-a3", + "owasp-m5" ], "defaultSeverity": "Critical", "ruleSpecification": "RSPEC-5542", diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5547.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5547.html index 208db2240d..77d60a3109 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5547.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5547.html @@ -1,7 +1,7 @@

    Strong cipher algorithms are cryptographic systems resistant to cryptanalysis, they are not vulnerable to well-known attacks like brute force attacks for example.

    A general recommendation is to only use cipher algorithms intensively tested and promoted by the cryptographic community.

    -

    More specifically for block cipher, it's not recommended to use algorithm with a block size inferior than 128 bits.

    +

    More specifically for block cipher, it’s not recommended to use algorithm with a block size inferior than 128 bits.

    Noncompliant Code Example

     <?php
    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5547.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5547.json
    index 41eb84cc51..08c96bd53b 100644
    --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5547.json
    +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5547.json
    @@ -2,12 +2,17 @@
       "title": "Cipher algorithms should be robust",
       "type": "VULNERABILITY",
       "status": "ready",
    +  "remediation": {
    +    "func": "Constant\/Issue",
    +    "constantCost": "15min"
    +  },
       "tags": [
         "cwe",
         "privacy",
         "owasp-a6",
         "sans-top25-porous",
    -    "owasp-a3"
    +    "owasp-a3",
    +    "owasp-m5"
       ],
       "defaultSeverity": "Critical",
       "ruleSpecification": "RSPEC-5547",
    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5632.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5632.json
    index 321041374e..919612e113 100644
    --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5632.json
    +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5632.json
    @@ -6,9 +6,7 @@
         "func": "Constant\/Issue",
         "constantCost": "5min"
       },
    -  "tags": [
    -    
    -  ],
    +  "tags": [],
       "defaultSeverity": "Blocker",
       "ruleSpecification": "RSPEC-5632",
       "sqKey": "S5632",
    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5693.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5693.html
    index 38ad90660f..f267f89e78 100644
    --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5693.html
    +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5693.html
    @@ -13,7 +13,7 @@ 

    Recommended Secure Coding Practices

    +

    It is recommended to customize the rule with the limit values that correspond to the web application.

    Sensitive Code Example

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5779.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5779.json index 4da08cf6c7..9f15d73be0 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5779.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5779.json @@ -2,6 +2,10 @@ "title": "Assertion failure exceptions should not be ignored", "type": "BUG", "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "5min" + }, "tags": [ "tests", "phpunit" diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5783.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5783.json index 4346551893..b1ac582ffe 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5783.json +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5783.json @@ -2,6 +2,10 @@ "title": "Only one method invocation is expected when testing exceptions", "type": "BUG", "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "5min" + }, "tags": [ "tests", "phpunit" diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5785.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5785.html index 2433f16de5..55f67ffd45 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5785.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5785.html @@ -1,4 +1,4 @@ -

    Testing equality or nullness with PHPUnit's assertTrue() or assertFalse() should be simplified to the corresponding +

    Testing equality or nullness with PHPUnit’s assertTrue() or assertFalse() should be simplified to the corresponding dedicated assertion.

    Noncompliant Code Example

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5785.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5785.json
    index be406ffb6c..ebaa53c4d9 100644
    --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5785.json
    +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5785.json
    @@ -2,6 +2,10 @@
       "title": "PHPUnit assertTrue\/assertFalse should be simplified to the corresponding dedicated assertion",
       "type": "CODE_SMELL",
       "status": "ready",
    +  "remediation": {
    +    "func": "Constant\/Issue",
    +    "constantCost": "2min"
    +  },
       "tags": [
         "tests",
         "phpunit"
    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5808.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5808.html
    index 96f51ca3c2..5ccd9444e2 100644
    --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5808.html
    +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5808.html
    @@ -1,5 +1,5 @@
     

    Authorizations granted or not to users to access resources of an application should be based on strong decisions. For instance, checking whether -the user is authenticated or not, has the right roles/privileges. It may also depend on the user's location, or the date, time when the user requests +the user is authenticated or not, has the right roles/privileges. It may also depend on the user’s location, or the date, time when the user requests access.

    Noncompliant Code Example

    In a Symfony web application:

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5863.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5863.html index 802e42228e..3bec1a2be4 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5863.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5863.html @@ -1,4 +1,4 @@ -

    Assertions comparing an object to itself are more likely to be bugs due to developer's carelessness.

    +

    Assertions comparing an object to itself are more likely to be bugs due to developer’s carelessness.

    This rule raises an issue when the actual expression matches the expected expression.

    Noncompliant Code Example

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5876.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5876.html
    index 94a7033973..7b7582219b 100644
    --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5876.html
    +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5876.html
    @@ -1,4 +1,4 @@
    -

    Session fixation attacks occur when an attacker can force a legitimate user to use a session ID that he knows. To avoid fixation attacks, it's a +

    Session fixation attacks occur when an attacker can force a legitimate user to use a session ID that he knows. To avoid fixation attacks, it’s a good practice to generate a new session each time a user authenticates and delete/invalidate the existing session (the one possibly known by the attacker).

    Noncompliant Code Example

    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5899.html b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5899.html index 1151980ad1..56ba5cb564 100644 --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5899.html +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S5899.html @@ -1,8 +1,8 @@

    The PHPUnit test runner does execute public methods defined within test classes that have a name starting with "test" or the -@test annotation. Methods that do not convey to this will not get executed.

    +@test annotation. Methods that do not convey to this will not get executed.

    This rule raises an issue on methods marked as test methods (by name or annotation) but do not have a public visibility. An issue is also raised on public methods that are not marked as tests, do contain assertions, and are not called from within another discoverable test method within the class. -No issues are raised in abstract classes.

    +No issues are raised in abstract classes.

    Noncompliant Code Example

     class MyTest extends \PHPUnit\Framework\TestCase {
    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S881.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S881.json
    index 631b8ac253..9cecc4de2e 100644
    --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S881.json
    +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S881.json
    @@ -6,9 +6,7 @@
         "func": "Constant\/Issue",
         "constantCost": "5min"
       },
    -  "tags": [
    -    
    -  ],
    +  "tags": [],
       "defaultSeverity": "Major",
       "ruleSpecification": "RSPEC-881",
       "sqKey": "S881",
    diff --git a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S930.json b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S930.json
    index e9d441d31b..3865061ef1 100644
    --- a/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S930.json
    +++ b/php-checks/src/main/resources/org/sonar/l10n/php/rules/php/S930.json
    @@ -7,8 +7,7 @@
         "constantCost": "10min"
       },
       "tags": [
    -    "cwe",
    -    "based-on-misra"
    +    "cwe"
       ],
       "defaultSeverity": "Major",
       "ruleSpecification": "RSPEC-930",
    @@ -17,6 +16,10 @@
       "securityStandards": {
         "CWE": [
           628
    +    ],
    +    "CERT": [
    +      "EXP37-C.",
    +      "DCL07-C."
         ]
       }
     }
    diff --git a/sonarpedia.json b/sonarpedia.json
    index f596c4d8d9..26b4802ab4 100644
    --- a/sonarpedia.json
    +++ b/sonarpedia.json
    @@ -3,7 +3,7 @@
       "languages": [
         "PHP"
       ],
    -  "latest-update": "2021-04-23T08:30:00.832237Z",
    +  "latest-update": "2021-08-16T12:31:35.301669Z",
       "options": {
         "no-language-in-filenames": true,
         "preserve-filenames": true