Skip to content

Commit 9e24dce

Browse files
authored
Update rules metadata (#1988)
1 parent 93ffcfc commit 9e24dce

File tree

16 files changed

+120
-56
lines changed

16 files changed

+120
-56
lines changed

python-checks/src/main/resources/org/sonar/l10n/py/rules/python/ParsingError.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"ruleSpecification": "RSPEC-2260",
1414
"sqKey": "ParsingError",
1515
"scope": "All",
16-
"quickfix": "unknown"
16+
"quickfix": "infeasible"
1717
}

python-checks/src/main/resources/org/sonar/l10n/py/rules/python/S112.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
397
2626
]
2727
},
28-
"quickfix": "unknown"
28+
"quickfix": "infeasible"
2929
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
546
2525
]
2626
},
27-
"quickfix": "unknown"
27+
"quickfix": "infeasible"
2828
}

python-checks/src/main/resources/org/sonar/l10n/py/rules/python/S1186.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
"ruleSpecification": "RSPEC-1186",
2020
"sqKey": "S1186",
2121
"scope": "All",
22-
"quickfix": "unknown"
22+
"quickfix": "infeasible"
2323
}

python-checks/src/main/resources/org/sonar/l10n/py/rules/python/S1763.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
561
2626
]
2727
},
28-
"quickfix": "unknown"
28+
"quickfix": "infeasible"
2929
}

python-checks/src/main/resources/org/sonar/l10n/py/rules/python/S1871.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
"ruleSpecification": "RSPEC-1871",
2121
"sqKey": "S1871",
2222
"scope": "Main",
23-
"quickfix": "unknown"
23+
"quickfix": "infeasible"
2424
}

python-checks/src/main/resources/org/sonar/l10n/py/rules/python/S2068.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<p>Credentials should be stored outside of the code in a configuration file, a database, or a management service for secrets.</p>
99
<p>This rule flags instances of hard-coded credentials used in database and LDAP connections. It looks for hard-coded credentials in connection
1010
strings, and for variable names that match any of the patterns from the provided list.</p>
11-
<p>It’s recommended to customize the configuration of this rule with additional credential words such as "oauthToken", "secret", …​</p>
1211
<h2>Ask Yourself Whether</h2>
1312
<ul>
1413
<li> Credentials allow access to a sensitive component like a database, a file storage, an API or a service. </li>

python-checks/src/main/resources/org/sonar/l10n/py/rules/python/S3329.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h4>Noncompliant code example</h4>
4444
modes,
4545
)
4646

47-
iv = "doNotTryThis@Home2023"
47+
iv = b"exampleIV1234567"
4848
cipher = Cipher(algorithms.AES(key), modes.CBC(iv))
4949

5050
cipher.encryptor() # Noncompliant
@@ -83,7 +83,7 @@ <h4>Noncompliant code example</h4>
8383
from Crypto.Random import get_random_bytes
8484
from Crypto.Util.Padding import pad
8585

86-
iv = "doNotTryThis@Home2023"
86+
iv = b"exampleIV1234567"
8787
cipher = AES.new(key, AES.MODE_CBC, iv)
8888
cipher.encrypt(pad(data, AES.block_size)) # Noncompliant
8989
</pre>

python-checks/src/main/resources/org/sonar/l10n/py/rules/python/S4144.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
"ruleSpecification": "RSPEC-4144",
2222
"sqKey": "S4144",
2323
"scope": "All",
24-
"quickfix": "unknown"
24+
"quickfix": "infeasible"
2525
}

python-checks/src/main/resources/org/sonar/l10n/py/rules/python/S4502.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ <h2>See</h2>
142142
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/352">CWE-352 - Cross-Site Request Forgery (CSRF)</a> </li>
143143
<li> OWASP - <a href="https://owasp.org/www-project-top-ten/2017/A6_2017-Security_Misconfiguration">Top 10 2017 Category A6 - Security
144144
Misconfiguration</a> </li>
145-
<li> <a href="https://owasp.org/www-community/attacks/csrf">OWASP: Cross-Site Request Forgery</a> </li>
145+
<li> OWASP - <a href="https://owasp.org/www-community/attacks/csrf">Cross-Site Request Forgery</a> </li>
146146
<li> STIG Viewer - <a href="https://stigviewer.com/stig/application_security_and_development/2023-06-08/finding/V-222603">Application Security and
147147
Development: V-222603</a> - The application must protect from Cross-Site Request Forgery (CSRF) vulnerabilities. </li>
148+
<li> PortSwigger - <a href="https://portswigger.net/research/web-storage-the-lesser-evil-for-session-tokens">Web storage: the lesser evil for
149+
session tokens</a> </li>
148150
</ul>
149151

0 commit comments

Comments
 (0)