diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1066.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1066.json index 3089fe0f1ca..218c1e03fd2 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1066.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1066.json @@ -13,5 +13,5 @@ "ruleSpecification": "RSPEC-1066", "sqKey": "S1066", "scope": "All", - "quickfix": "unknown" + "quickfix": "covered" } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1132.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1132.json index 26b50bfa210..45e8cb432df 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1132.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1132.json @@ -13,5 +13,5 @@ "ruleSpecification": "RSPEC-1132", "sqKey": "S1132", "scope": "All", - "quickfix": "unknown" + "quickfix": "covered" } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1181.html b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1181.html index 78fa1ca6ad3..b0bf820e980 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1181.html +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1181.html @@ -15,7 +15,7 @@

Compliant Solution

See

diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1217.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1217.json index f2122cb0590..d36cdf252c7 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1217.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1217.json @@ -23,5 +23,5 @@ "THI00-J." ] }, - "quickfix": "unknown" + "quickfix": "covered" } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1450.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1450.json index 1a6f89c7f89..0e3960e7074 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1450.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1450.json @@ -13,5 +13,5 @@ "ruleSpecification": "RSPEC-1450", "sqKey": "S1450", "scope": "Main", - "quickfix": "unknown" + "quickfix": "partial" } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1656.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1656.json index 9c0aa2f4d23..22b10a55b13 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1656.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S1656.json @@ -13,7 +13,7 @@ "ruleSpecification": "RSPEC-1656", "sqKey": "S1656", "scope": "All", - "quickfix": "unknown", + "quickfix": "partial", "securityStandards": { "CERT": [ "MSC12-C." diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2116.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2116.json index b7ecd7627f1..42ae1fdb233 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2116.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2116.json @@ -11,5 +11,5 @@ "ruleSpecification": "RSPEC-2116", "sqKey": "S2116", "scope": "All", - "quickfix": "unknown" + "quickfix": "covered" } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2129.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2129.json index 8986776eb2c..b69eb92e570 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2129.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2129.json @@ -13,5 +13,5 @@ "ruleSpecification": "RSPEC-2129", "sqKey": "S2129", "scope": "All", - "quickfix": "unknown" + "quickfix": "covered" } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2147.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2147.json index 9347549328f..ec25c3e4454 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2147.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2147.json @@ -13,5 +13,5 @@ "ruleSpecification": "RSPEC-2147", "sqKey": "S2147", "scope": "All", - "quickfix": "unknown" + "quickfix": "covered" } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2225.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2225.json index 5a2bd523f85..4c7106cf858 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2225.json +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2225.json @@ -22,5 +22,5 @@ 476 ] }, - "quickfix": "unknown" + "quickfix": "covered" } diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2612.html b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2612.html index 2d7f24ffe8c..a4ec70420e7 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2612.html +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S2612.html @@ -1,5 +1,7 @@ -

In Unix, "others" class refers to all users except the owner of the file and the members of the group assigned to this file.

-

Granting permissions to this group can lead to unintended access to files.

+

In Unix file system permissions, the "others" category refers to all users except the owner of the file system resource and the +members of the group assigned to this resource.

+

Granting permissions to this category can lead to unintended access to files or directories that could allow attackers to obtain sensitive +information, disrupt services or elevate privileges.

Ask Yourself Whether

-

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 +

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 start the application if it is not already running once a matching broadcast is received. The receiver is an entry point into the application.

Other applications can send potentially malicious broadcasts, so it is important to consider broadcasts as untrusted and to limit the applications that can send broadcasts to the receiver.

Permissions can be specified to restrict broadcasts to authorized applications. Restrictions can be enforced by both the sender and receiver of a broadcast. If permissions are specified when registering a broadcast receiver, then only broadcasters who were granted this permission can send a message to the receiver.

-

This rule raises an issue when a receiver is registered without specifying any "broadcast permission".

+

This rule raises an issue when a receiver is registered without specifying any broadcast permission.

Ask Yourself Whether

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

Recommended Secure Coding Practices

-

Restrict the access to broadcasted intents. See Restrict the access to broadcasted intents. See the Android documentation for more information.

Sensitive Code Example

diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S5332.html b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S5332.html index 104a45c588d..4f9409816db 100644 --- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S5332.html +++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S5332.html @@ -68,7 +68,7 @@

Sensitive Code Example

.build();

Android WebView can be configured to allow a secure origin to load content from any other origin, even if that origin is insecure (mixed -content);

+content):

 import android.webkit.WebView
 
@@ -79,22 +79,22 @@ 

Compliant Solution

Use instead these clients from Apache commons net and JSch/ssh library:

-JSch jsch = new JSch(); // Compliant
+JSch jsch = new JSch();
 
 if(implicit) {
   // implicit mode is considered deprecated but offer the same security than explicit mode
-  FTPSClient ftpsClient = new FTPSClient(true); // Compliant
+  FTPSClient ftpsClient = new FTPSClient(true);
 }
 else {
-  FTPSClient ftpsClient = new FTPSClient(); // Compliant
+  FTPSClient ftpsClient = new FTPSClient();
 }
 
 if(implicit) {
   // implicit mode is considered deprecated but offer the same security than explicit mode
-  SMTPSClient smtpsClient = new SMTPSClient(true); // Compliant
+  SMTPSClient smtpsClient = new SMTPSClient(true);
 }
 else {
-  SMTPSClient smtpsClient = new SMTPSClient(); // Compliant
+  SMTPSClient smtpsClient = new SMTPSClient();
   smtpsClient.connect("127.0.0.1", 25);
   if (smtpsClient.execTLS()) {
     // commands
@@ -103,10 +103,10 @@ 

Compliant Solution

Perform HTTP encrypted connections, with okhttp library for instance:

-ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) // Compliant
+ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
   .build();
 
-

The most secure mode for Android WebView is MIXED_CONTENT_NEVER_ALLOW;

+

The most secure mode for Android WebView is MIXED_CONTENT_NEVER_ALLOW:

 import android.webkit.WebView
 
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S5810.json b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S5810.json
index cf8251bf4cd..af285bfeb67 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S5810.json
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S5810.json
@@ -14,5 +14,5 @@
   "ruleSpecification": "RSPEC-5810",
   "sqKey": "S5810",
   "scope": "Tests",
-  "quickfix": "unknown"
+  "quickfix": "covered"
 }
diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6362.html b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6362.html
index 571ec55b7ab..65a90eb1a09 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6362.html
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6362.html
@@ -1,6 +1,6 @@
 

WebViews can be used to display web content as part of a mobile application. A browser engine is used to render and display the content. Like a web -application a mobile application that uses WebViews can be vulnerable to Cross-Site Scripting if untrusted code is rendered. In the context of a -WebView JavaScript code can exfiltrate local files that might be sensitive or even worse, access exposed functions of the application that can result +application, a mobile application that uses WebViews can be vulnerable to Cross-Site Scripting if untrusted code is rendered. In the context of a +WebView, JavaScript code can exfiltrate local files that might be sensitive or even worse, access exposed functions of the application that can result in more severe vulnerabilities such as code injection. Thus JavaScript support should not be enabled for WebViews unless it is absolutely necessary and the authenticity of the web resources can be guaranteed.

Ask Yourself Whether

@@ -10,7 +10,7 @@

Ask Yourself Whether

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

Recommended Secure Coding Practices

-

It’s recommended to disable JavaScript support for WebViews unless it is necessary to execute JavaScript code. Only trusted pages should be +

It is recommended to disable JavaScript support for WebViews unless it is necessary to execute JavaScript code. Only trusted pages should be rendered.

Sensitive Code Example

diff --git a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6363.html b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6363.html
index 130e617b6a3..577980201c1 100644
--- a/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6363.html
+++ b/java-checks/src/main/resources/org/sonar/l10n/java/rules/java/S6363.html
@@ -1,5 +1,5 @@
 

WebViews can be used to display web content as part of a mobile application. A browser engine is used to render and display the content. Like a web -application a mobile application that uses WebViews can be vulnerable to Cross-Site Scripting if untrusted code is rendered.

+application, a mobile application that uses WebViews can be vulnerable to Cross-Site Scripting if untrusted code is rendered.

If malicious JavaScript code in a WebView is executed this can leak the contents of sensitive files when access to local files is enabled.

Ask Yourself Whether

    @@ -8,7 +8,7 @@

    Ask Yourself Whether

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

Recommended Secure Coding Practices

-

It’s recommended to disable access to local files for WebViews unless it is necessary. In the case of a successful attack through a Cross-Site +

It is recommended to disable access to local files for WebViews unless it is necessary. In the case of a successful attack through a Cross-Site Scripting vulnerability the attackers attack surface decreases drastically if no files can be read out.

Sensitive Code Example

diff --git a/sonarpedia.json b/sonarpedia.json
index e37dd3ba73d..894b35a9753 100644
--- a/sonarpedia.json
+++ b/sonarpedia.json
@@ -3,7 +3,7 @@
   "languages": [
     "JAVA"
   ],
-  "latest-update": "2023-01-06T15:19:03.336873100Z",
+  "latest-update": "2023-02-13T09:48:50.128257Z",
   "options": {
     "no-language-in-filenames": true,
     "preserve-filenames": false