Skip to content

Commit c13ae65

Browse files
Update rule meta data for version 3.14. (#735)
1 parent 24d7149 commit c13ae65

36 files changed

+89
-90
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<p>This rule raises an issue when URI's or path delimiters are hard coded.</p>
77
<h2>See</h2>
88
<ul>
9-
<li> <a href="https://www.securecoding.cert.org/confluence/x/qQCHAQ">CERT, MSC03-J.</a> - Never hard code sensitive information </li>
9+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/OjdGBQ">CERT, MSC03-J.</a> - Never hard code sensitive information </li>
1010
</ul>
1111

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ <h2>Compliant Solution</h2>
2929
</pre>
3030
<h2>See</h2>
3131
<ul>
32-
<li> <a href="https://www.securecoding.cert.org/confluence/x/NYA5">CERT, MSC12-C.</a> - Detect and remove code that has no effect or is never
33-
executed </li>
34-
<li> <a href="https://www.securecoding.cert.org/confluence/x/7gCTAw">CERT, MSC51-J.</a> - Do not place a semicolon immediately following an if, for,
35-
or while condition </li>
36-
<li> <a href="https://www.securecoding.cert.org/confluence/x/i4FtAg">CERT, EXP15-C.</a> - Do not place a semicolon on the same line as an if, for,
37-
or while statement </li>
32+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/5dUxBQ">CERT, MSC12-C.</a> - Detect and remove code that has no effect or is never executed
33+
</li>
34+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/IDZGBQ">CERT, MSC51-J.</a> - Do not place a semicolon immediately following an if, for, or while
35+
condition </li>
36+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/WtYxBQ">CERT, EXP15-C.</a> - Do not place a semicolon on the same line as an if, for, or while
37+
statement </li>
3838
</ul>
3939

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ <h2>Compliant Solution</h2>
1414
<h2>See</h2>
1515
<ul>
1616
<li> <a href="http://cwe.mitre.org/data/definitions/397.html">MITRE, CWE-397</a> - Declaration of Throws for Generic Exception </li>
17-
<li> <a href="https://www.securecoding.cert.org/confluence/x/BoB3AQ">CERT, ERR07-J.</a> - Do not throw RuntimeException, Exception, or Throwable
18-
</li>
17+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/_DdGBQ">CERT, ERR07-J.</a> - Do not throw RuntimeException, Exception, or Throwable </li>
1918
</ul>
2019

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ <h2>Exceptions</h2>
2626
<h2>See</h2>
2727
<ul>
2828
<li> <a href="http://cwe.mitre.org/data/definitions/481.html">MITRE, CWE-481</a> - Assigning instead of Comparing </li>
29-
<li> <a href="https://www.securecoding.cert.org/confluence/x/nYFtAg">CERT, EXP45-C.</a> - Do not perform assignments in selection statements </li>
30-
<li> <a href="https://www.securecoding.cert.org/confluence/x/1gCTAw">CERT, EXP51-J.</a> - Do not perform assignments in conditional expressions
31-
</li>
29+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/ZNYxBQ">CERT, EXP45-C.</a> - Do not perform assignments in selection statements </li>
30+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/ITZGBQ">CERT, EXP51-J.</a> - Do not perform assignments in conditional expressions </li>
3231
</ul>
3332

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h2>Exceptions</h2>
2424
</pre>
2525
<h2>See</h2>
2626
<ul>
27-
<li> <a href="https://www.securecoding.cert.org/confluence/x/NYA5">CERT, MSC12-C.</a> - Detect and remove code that has no effect or is never
28-
executed </li>
27+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/5dUxBQ">CERT, MSC12-C.</a> - Detect and remove code that has no effect or is never executed
28+
</li>
2929
</ul>
3030

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ <h2>Compliant Solution</h2>
1212
</pre>
1313
<h2>See</h2>
1414
<ul>
15-
<li> <a href="https://www.securecoding.cert.org/confluence/x/1QGMAg">CERT, EXP19-C.</a> - Use braces for the body of an if, for, or while statement
16-
</li>
17-
<li> <a href="https://www.securecoding.cert.org/confluence/x/3wHEAw">CERT, EXP52-J.</a> - Use braces for the body of an if, for, or while statement
18-
</li>
15+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/g9YxBQ">CERT, EXP19-C.</a> - Use braces for the body of an if, for, or while statement </li>
16+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/MzZGBQ">CERT, EXP52-J.</a> - Use braces for the body of an if, for, or while statement </li>
1917
</ul>
2018

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ <h2>Exceptions</h2>
4949
<h2>See</h2>
5050
<ul>
5151
<li> <a href="http://cwe.mitre.org/data/definitions/484.html">MITRE, CWE-484</a> - Omitted Break Statement in Switch </li>
52-
<li> <a href="https://www.securecoding.cert.org/confluence/x/YIFLAQ">CERT, MSC17-C.</a> - Finish every set of statements associated with a case
53-
label with a break statement </li>
54-
<li> <a href="https://www.securecoding.cert.org/confluence/x/ewHAAQ">CERT, MSC52-J.</a> - Finish every set of statements associated with a case
55-
label with a break statement </li>
52+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/ldYxBQ">CERT, MSC17-C.</a> - Finish every set of statements associated with a case label with a
53+
break statement </li>
54+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/1DdGBQ">CERT, MSC52-J.</a> - Finish every set of statements associated with a case label with a
55+
break statement </li>
5656
</ul>
5757

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ <h2>Compliant Solution</h2>
2929
<h2>See</h2>
3030
<ul>
3131
<li> <a href="http://cwe.mitre.org/data/definitions/478.html">MITRE, CWE-478</a> - Missing Default Case in Switch Statement </li>
32-
<li> <a href="https://www.securecoding.cert.org/confluence/x/YgE">CERT, MSC01-C.</a> - Strive for logical completeness </li>
32+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/RtYxBQ">CERT, MSC01-C.</a> - Strive for logical completeness </li>
3333
</ul>
3434

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,26 @@
55
</ul>
66
<p>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
77
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,
8-
delivery and deployment:</p>
8+
delivery, and deployment:</p>
99
<ul>
1010
<li> The developers will have to do a rapid fix every time this happens, instead of having an operation team change a configuration file. </li>
11-
<li> It forces the same address to be used in every environment (dev, sys, qa, prod). </li>
11+
<li> It misleads to use the same address in every environment (dev, sys, qa, prod). </li>
1212
</ul>
1313
<p>Last but not least it has an effect on application security. Attackers might be able to decompile the code and thereby discover a potentially
14-
sensitive address. They can perform a Denial of Service attack on the service at this address or spoof the IP address. Such an attack is always
15-
possible, but in the case of a hardcoded IP address the fix will be much slower, which will increase an attack's impact.</p>
14+
sensitive address. They can perform a Denial of Service attack on the service, try to get access to the system, or try to spoof the IP address to
15+
bypass security checks. Such attacks can always be possible, but in the case of a hardcoded IP address solving the issue will take more time, which
16+
will increase an attack's impact.</p>
1617
<h2>Ask Yourself Whether</h2>
17-
<p>The disclosed IP address is sensitive, eg:</p>
18+
<p>The disclosed IP address is sensitive, e.g.:</p>
1819
<ul>
1920
<li> Can give information to an attacker about the network topology. </li>
2021
<li> It's a personal (assigned to an identifiable person) IP address. </li>
2122
</ul>
2223
<p>There is a risk if you answered yes to any of these questions.</p>
2324
<h2>Recommended Secure Coding Practices</h2>
24-
<p>Don't hard-code the IP address in the source code, instead make it configurable.</p>
25+
<p>Don't hard-code the IP address in the source code, instead make it configurable with environment variables, configuration files, or a similar
26+
approach. Alternatively, if confidentially is not required a domain name can be used since it allows to change the destination quickly without having
27+
to rebuild the software.</p>
2528
<h2>Sensitive Code Example</h2>
2629
<pre>
2730
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
@@ -45,6 +48,6 @@ <h2>See</h2>
4548
<ul>
4649
<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
4750
</li>
48-
<li> <a href="https://www.securecoding.cert.org/confluence/x/qQCHAQ">CERT, MSC03-J.</a> - Never hard code sensitive information </li>
51+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/OjdGBQ">CERT, MSC03-J.</a> - Never hard code sensitive information </li>
4952
</ul>
5053

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ <h2>Exceptions</h2>
1818
</pre>
1919
<h2>See</h2>
2020
<ul>
21-
<li> <a href="https://www.securecoding.cert.org/confluence/x/_QC7AQ">CERT, DCL18-C.</a> - Do not begin integer constants with 0 when specifying a
22-
decimal value </li>
23-
<li> <a href="https://www.securecoding.cert.org/confluence/x/hYClBg">CERT, DCL50-J.</a> - Use visually distinct identifiers </li>
21+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/atYxBQ">CERT, DCL18-C.</a> - Do not begin integer constants with 0 when specifying a decimal
22+
value </li>
23+
<li> <a href="https://wiki.sei.cmu.edu/confluence/x/7DZGBQ">CERT, DCL50-J.</a> - Use visually distinct identifiers </li>
2424
</ul>
2525

0 commit comments

Comments
 (0)