Skip to content

Commit 1beb40c

Browse files
authored
SONARKT-664 Update rules metadata
1 parent a2af70e commit 1beb40c

File tree

9 files changed

+19
-15
lines changed

9 files changed

+19
-15
lines changed

sonar-kotlin-plugin/sonarpedia.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"languages": [
44
"KOTLIN"
55
],
6-
"latest-update": "2025-05-23T10:23:16.597800Z",
6+
"latest-update": "2025-07-12T19:40:22.641523Z",
77
"options": {
88
"no-language-in-filenames": true,
99
"preserve-filenames": true

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1313.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p>Hardcoding IP addresses is security-sensitive. It has led in the past to the following vulnerabilities:</p>
22
<ul>
3-
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-5901">CVE-2006-5901</a> </li>
4-
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-3725">CVE-2005-3725</a> </li>
3+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2006-5901">CVE-2006-5901</a> </li>
4+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2005-3725">CVE-2005-3725</a> </li>
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,

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2068.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
for applications that are distributed or that are open-source.</p>
33
<p>In the past, it has led to the following vulnerabilities:</p>
44
<ul>
5-
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13466">CVE-2019-13466</a> </li>
6-
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-15389">CVE-2018-15389</a> </li>
5+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2019-13466">CVE-2019-13466</a> </li>
6+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2018-15389">CVE-2018-15389</a> </li>
77
</ul>
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>

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S2245.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
values that must remain confidential and resistant to guessing attacks.</p>
88
<p>For example, the use of non-cryptographic PRNGs has led to vulnerabilities such as:</p>
99
<ul>
10-
<li> <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6386">CVE-2013-6386</a> </li>
11-
<li> <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-3419">CVE-2006-3419</a> </li>
12-
<li> <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4102">CVE-2008-4102</a> </li>
10+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2013-6386">CVE-2013-6386</a> </li>
11+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2006-3419">CVE-2006-3419</a> </li>
12+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2008-4102">CVE-2008-4102</a> </li>
1313
</ul>
1414
<p>When software generates predictable values in a context requiring unpredictability, it may be possible for an attacker to guess the next value that
1515
will be generated, and use this guess to impersonate another user or access sensitive information. Therefore, it is critical to use CSPRNGs in any

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5320.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p>In Android applications, broadcasting intents is security-sensitive. For example, it has led in the past to the following vulnerability:</p>
22
<ul>
3-
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-9489">CVE-2018-9489</a> </li>
3+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2018-9489">CVE-2018-9489</a> </li>
44
</ul>
55
<p>By default, broadcasted intents are visible to every application, exposing all sensitive information they contain.</p>
66
<p>This rule raises an issue when an intent is broadcasted without specifying any "receiver permission".</p>

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S5322.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<p>Android applications can receive broadcasts from the system or other applications. Receiving intents is security-sensitive. For example, it has led
22
in the past to the following vulnerabilities:</p>
33
<ul>
4-
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1677">CVE-2019-1677</a> </li>
5-
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-1275">CVE-2015-1275</a> </li>
4+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2019-1677">CVE-2019-1677</a> </li>
5+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2015-1275">CVE-2015-1275</a> </li>
66
</ul>
77
<p>Receivers can be declared in the manifest or in the code to make them context-specific. If the receiver is declared in the manifest Android will
88
start the application if it is not already running once a matching broadcast is received. The receiver is an entry point into the application.</p>

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6418.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
applications that are distributed or that are open-source.</p>
33
<p>In the past, it has led to the following vulnerabilities:</p>
44
<ul>
5-
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-25510">CVE-2022-25510</a> </li>
6-
<li> <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42635">CVE-2021-42635</a> </li>
5+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2022-25510">CVE-2022-25510</a> </li>
6+
<li> <a href="https://www.cve.org/CVERecord?id=CVE-2021-42635">CVE-2021-42635</a> </li>
77
</ul>
88
<p>Secrets should be stored outside of the source code in a configuration file or a management service for secrets.</p>
99
<p>This rule detects variables/fields having a name matching a list of words (secret, token, credential, auth, api[_.-]?key) being assigned a
@@ -87,6 +87,8 @@ <h2>See</h2>
8787
<li> OWASP - <a href="https://owasp.org/www-project-top-ten/2017/A2_2017-Broken_Authentication">Top 10 2017 Category A2 - Broken Authentication</a>
8888
</li>
8989
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/798">CWE-798 - Use of Hard-coded Credentials</a> </li>
90+
<li> OWASP - <a href="https://owasp.org/www-project-mobile-top-10/2023-risks/m1-improper-credential-usage.html">Mobile Top 10 2024 Category M1 -
91+
Improper Credential Usage</a> </li>
9092
<li> MSC - <a href="https://wiki.sei.cmu.edu/confluence/x/OjdGBQ">MSC03-J - Never hard code sensitive information</a> </li>
9193
</ul>
9294

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S6418.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
"OWASP Top 10 2021": [
3333
"A7"
3434
],
35+
"OWASP Mobile Top 10 2024": [
36+
"M1"
37+
],
3538
"PCI DSS 3.2": [
3639
"6.5.10"
3740
],

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S7409.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
79
3030
]
3131
},
32-
"quickfix": "partial",
32+
"quickfix": "unknown",
3333
"code": {
3434
"impacts": {
3535
"SECURITY": "MEDIUM"

0 commit comments

Comments
 (0)