From 85d80e13468a82802790786a61e6df32083b26b6 Mon Sep 17 00:00:00 2001 From: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com> Date: Mon, 8 May 2023 18:00:26 +0200 Subject: [PATCH] Update rule metadata (#672) --- iac-extensions/cloudformation/sonarpedia.json | 2 +- .../rules/cloudformation/S1135.html | 5 ++- .../rules/cloudformation/S2260.html | 1 + .../rules/cloudformation/S4423.html | 7 ++-- .../rules/cloudformation/S6273.html | 7 ++-- .../rules/cloudformation/S6294.html | 5 ++- .../rules/cloudformation/S6295.html | 5 ++- .../rules/cloudformation/S6302.html | 2 +- .../rules/cloudformation/S6304.html | 2 +- .../rules/cloudformation/S6317.html | 7 ++-- .../rules/cloudformation/S6321.html | 7 ++-- .../rules/cloudformation/S6329.html | 2 +- .../rules/cloudformation/S6333.html | 2 +- iac-extensions/docker/sonarpedia.json | 2 +- .../checks/MountWorldPermissionCheck.java | 6 +-- .../iac/docker/checks/utils/CheckUtils.java | 6 +++ .../sonar/iac/docker/utils/CheckUtils.java | 38 ------------------ .../sonar/iac/docker/utils/package-info.java | 21 ---------- .../sonar/l10n/docker/rules/docker/S1135.html | 5 ++- .../sonar/l10n/docker/rules/docker/S2260.html | 1 + .../sonar/l10n/docker/rules/docker/S4423.html | 7 ++-- .../sonar/l10n/docker/rules/docker/S4790.html | 2 +- .../sonar/l10n/docker/rules/docker/S4830.html | 7 ++-- .../sonar/l10n/docker/rules/docker/S6437.html | 7 ++-- .../sonar/l10n/docker/rules/docker/S6469.html | 7 ++-- .../sonar/l10n/docker/rules/docker/S6476.html | 5 ++- .../sonar/l10n/docker/rules/docker/S6506.html | 39 +++++++------------ iac-extensions/kubernetes/sonarpedia.json | 2 +- .../kubernetes/rules/kubernetes/S1135.html | 5 ++- .../kubernetes/rules/kubernetes/S2260.html | 1 + iac-extensions/terraform/sonarpedia.json | 2 +- .../l10n/terraform/rules/terraform/S1135.html | 5 ++- .../l10n/terraform/rules/terraform/S2260.html | 1 + .../l10n/terraform/rules/terraform/S4423.html | 7 ++-- .../l10n/terraform/rules/terraform/S6273.html | 7 ++-- .../l10n/terraform/rules/terraform/S6302.html | 2 +- .../l10n/terraform/rules/terraform/S6304.html | 2 +- .../l10n/terraform/rules/terraform/S6317.html | 7 ++-- .../l10n/terraform/rules/terraform/S6321.html | 7 ++-- .../l10n/terraform/rules/terraform/S6333.html | 2 +- .../l10n/terraform/rules/terraform/S6385.html | 9 +++-- .../l10n/terraform/rules/terraform/S6410.html | 7 ++-- pom.xml | 2 +- 43 files changed, 119 insertions(+), 156 deletions(-) delete mode 100644 iac-extensions/docker/src/main/java/org/sonar/iac/docker/utils/CheckUtils.java delete mode 100644 iac-extensions/docker/src/main/java/org/sonar/iac/docker/utils/package-info.java diff --git a/iac-extensions/cloudformation/sonarpedia.json b/iac-extensions/cloudformation/sonarpedia.json index bbb3732c4c..d0e66f8a00 100644 --- a/iac-extensions/cloudformation/sonarpedia.json +++ b/iac-extensions/cloudformation/sonarpedia.json @@ -3,7 +3,7 @@ "languages": [ "CLOUD_FORMATION" ], - "latest-update": "2023-04-03T19:16:23.688661Z", + "latest-update": "2023-05-08T07:13:45.831563776Z", "options": { "no-language-in-filenames": true, "preserve-filenames": true diff --git a/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S1135.html b/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S1135.html index dedef83834..5ff10288ef 100644 --- a/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S1135.html +++ b/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S1135.html @@ -1,12 +1,13 @@ +

Why is this an issue?

TODO tags are commonly used to mark places where some more code is required, but which the developer wants to implement later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

-

Noncompliant Code Example

+

Noncompliant code example

 # TODO
 AWSTemplateFormatVersion: 2010-09-09
 
-

See

+

Resources

diff --git a/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S2260.html b/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S2260.html index 3ffcf53601..d8508bec15 100644 --- a/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S2260.html +++ b/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S2260.html @@ -1,3 +1,4 @@ +

Why is this an issue?

When the CloudFormation parser fails, it is possible to record the failure as a violation on the file. This way, not only it is possible to track the number of files that do not parse but also to easily find out why they do not parse.

diff --git a/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S4423.html b/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S4423.html index d885cf868a..b086cf367b 100644 --- a/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S4423.html +++ b/iac-extensions/cloudformation/src/main/resources/org/sonar/l10n/cloudformation/rules/cloudformation/S4423.html @@ -1,3 +1,4 @@ +

Why is this an issue?

This rule raises an issue when an insecure TLS protocol version (i.e. a protocol different from "TLSv1.2", "TLSv1.3", "DTLSv1.2", or "DTLSv1.3") is used or allowed.

It is recommended to enforce TLS 1.2 as the minimum protocol version and to disallow older versions like TLS 1.0. Failure to do so could open the @@ -6,7 +7,7 @@

In most cases, using the default system configuration is not compliant. Indeed, an application might get deployed on a wide range of systems with different configurations. While using a system’s default value might be safe on modern up-to-date systems, this might not be the case on older systems. It is therefore recommended to explicitly set a safe configuration in every case.

-

Noncompliant Code Example

+

Noncompliant code example

For Amazon OpenSearch domains:

 AWSTemplateFormatVersion: 2010-09-09
@@ -34,7 +35,7 @@ 

Noncompliant Code Example

CustomApi: # Noncompliant Type: AWS::ApiGatewayV2::DomainName
-

Compliant Solution

+

Compliant solution

For Amazon OpenSearch domains:

 AWSTemplateFormatVersion: 2010-09-09
@@ -65,7 +66,7 @@ 

Compliant Solution

DomainNameConfigurations: - SecurityPolicy: "TLS_1_2"
-

See

+

Resources