diff --git a/css-sonarpedia/sonarpedia.json b/css-sonarpedia/sonarpedia.json index 0e415b7216f..60bb012a4f5 100644 --- a/css-sonarpedia/sonarpedia.json +++ b/css-sonarpedia/sonarpedia.json @@ -3,7 +3,7 @@ "languages": [ "CSS" ], - "latest-update": "2023-11-01T10:11:33.309415200Z", + "latest-update": "2023-12-21T17:13:56.851986Z", "options": { "no-language-in-filenames": true } diff --git a/sonar-plugin/css/src/main/resources/org/sonar/l10n/css/rules/css/S4663.html b/sonar-plugin/css/src/main/resources/org/sonar/l10n/css/rules/css/S4663.html index 98b9759c7bc..0ae79ebbd38 100644 --- a/sonar-plugin/css/src/main/resources/org/sonar/l10n/css/rules/css/S4663.html +++ b/sonar-plugin/css/src/main/resources/org/sonar/l10n/css/rules/css/S4663.html @@ -1,5 +1,5 @@

Why is this an issue?

-

Empty comments like the following don’t improve readability and might indicate an oversight.

+

Empty comments, as shown in the example, hurt readability and might indicate an oversight.

 /*  */
 
@@ -7,5 +7,5 @@ 

Why is this an issue?

*/
-

A meaningful text should be added to the comment or the comment markers should be removed.

+

Some meaningful text should be added to the comment, or the comment markers should be removed.

diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S2187.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S2187.html index 6cf98ba4399..ddc452a26eb 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S2187.html +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S2187.html @@ -6,10 +6,10 @@

Why is this an issue?

  • An incomplete test suite: Perhaps the developer started writing tests but didn’t finish.
  • A mistake: The developer might have accidentally deleted the test cases or moved them to another file.
  • -

    This rule flags any file that has a .test or .spec suffix but does not contain any test cases defined using the different -forms of the it and test functions from Jasmine, Jest, Mocha, or Node.js testing API.

    +

    This rule flags any file that has .test or .spec as part of its suffix but does not contain any test cases defined using +the different forms of the it and test functions from Jasmine, Jest, Mocha, or Node.js testing API.

    How to fix it

    -

    To fix a test file that doesn’t contain any test cases, you should add test cases or delete the file if it isn’t needed.

    +

    Add test cases to the file or delete it if it isn’t needed anymore.

    Code examples

    Noncompliant code example

    diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S3358.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S3358.html
    index bab3b9a1536..defd7f7cdac 100644
    --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S3358.html
    +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S3358.html
    @@ -30,4 +30,9 @@ 

    Exceptions

    </> );
    +

    Resources

    +

    Articles & blog posts

    + diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5542.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5542.html index 2ebb997ce1a..5c76776e8c6 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5542.html +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5542.html @@ -14,9 +14,9 @@

    Why is this an issue?

    For these reasons, as soon as cryptography is included in a project, it is important to choose encryption algorithms that are considered strong and secure by the cryptography community.

    -

    For AES, the weakest modes are CBC (Cipher Block Chaining) and ECB

    -

    (Electronic Codebook), as they are either vulnerable to padding oracles or do not provide authentication mechanisms.

    -

    And for RSA, the weakest algorithms are either using it without padding or using the PKCS1v1.5 padding scheme.

    +

    For AES, the weakest modes are CBC (Cipher Block Chaining) and ECB (Electronic Codebook) because they are either vulnerable to padding oracles or +do not provide authentication mechanisms.

    +

    For RSA, the weakest algorithms are either using it without padding or using the PKCS1v1.5 padding scheme.

    What is the potential impact?

    The cleartext of an encrypted message might be recoverable. Additionally, it might be possible to modify the cleartext of an encrypted message.

    Below are some real-world scenarios that illustrate possible impacts of an attacker exploiting the vulnerability.

    diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5547.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5547.html index 098c1154d73..94225ace165 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5547.html +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5547.html @@ -3,9 +3,9 @@

    Why is this an issue?

    Encryption algorithms are essential for protecting sensitive information and ensuring secure communication in various domains. They are used for several important reasons:

    When selecting encryption algorithms, tools, or combinations, you should also consider two things:

      diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5659.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5659.html index 4efae692f6f..b8b0365f33f 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5659.html +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5659.html @@ -62,13 +62,13 @@

      Verify the signature of your tokens

      signatures, they are not serving their purpose.

      Every time your application receives a JWT, it needs to decode the token to extract the information contained within. It is during this decoding process that the signature of the JWT should also be checked.

      -

      To resolve the issue follow these instructions:

      +

      To resolve the issue, follow these instructions:

      1. Use framework-specific functions for signature verification: Most programming frameworks that support JWTs provide specific functions to not only decode a token but also validate its signature simultaneously. Make sure to use these functions when handling incoming tokens.
      2. Handle invalid signatures appropriately: If a JWT’s signature does not validate correctly, it means the token is not trustworthy, indicating - potential tampering. The action to take on encountering an invalid token should be denying the request carrying it and logging the event for further - investigation.
      3. + potential tampering. The action to take when encountering an invalid token should be denying the request carrying it and logging the event for + further investigation.
      4. Incorporate signature validation in your tests: When you are writing tests for your application, include tests that check the signature validation functionality. This can help you catch any instances where signature verification might be unintentionally skipped or bypassed.
      diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5743.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5743.html index 4311d96595d..a256f61150e 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5743.html +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5743.html @@ -1,3 +1,4 @@ +

      This rule is deprecated, and will eventually be removed.

      By default, web browsers perform DNS prefetching to reduce latency due to DNS resolutions required when an user clicks links from a website page.

      For instance on example.com the hyperlink below contains a cross-origin domain name that must be resolved to an IP address by the web browser:

      diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5743.json b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5743.json index c6039470578..c024f69d742 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5743.json +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S5743.json @@ -1,5 +1,5 @@ { - "title": "Allowing browsers to perform DNS prefetching is security-sensitive", + "title": "Allowing browsers to perform DNS prefetching is security-sensitive", "type": "SECURITY_HOTSPOT", "code": { "impacts": { @@ -7,15 +7,12 @@ }, "attribute": "COMPLETE" }, - "status": "ready", + "status": "deprecated", "remediation": { "func": "Constant\/Issue", "constantCost": "10min" }, - "tags": [ - "privacy", - "express.js" - ], + "tags": [], "defaultSeverity": "Minor", "ruleSpecification": "RSPEC-5743", "sqKey": "S5743", diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6245.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6245.html index 32ddd21bec6..3eb3b8fe391 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6245.html +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6245.html @@ -1,3 +1,4 @@ +

      This rule is deprecated, and will eventually be removed.

      Server-side encryption (SSE) encrypts an object (not the metadata) as it is written to disk (where the S3 bucket resides) and decrypts it as it is read from disk. This doesn’t change the way the objects are accessed, as long as the user has the necessary permissions, objects are retrieved as if they were unencrypted. Thus, SSE only helps in the event of disk thefts, improper disposals of disks and other attacks on the AWS infrastructure diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6245.json b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6245.json index d86a8ecf47b..be0358c96cf 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6245.json +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6245.json @@ -7,11 +7,8 @@ }, "attribute": "COMPLETE" }, - "status": "ready", - "tags": [ - "aws", - "cwe" - ], + "status": "deprecated", + "tags": [], "defaultSeverity": "Minor", "ruleSpecification": "RSPEC-6245", "sqKey": "S6245", diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6859.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6859.html index 0ee0b0b9a13..6edfc99c62e 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6859.html +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6859.html @@ -1,7 +1,8 @@

      Why is this an issue?

      -

      In Node.js importing modules is doable by providing an absolute path such as /lib/foo/bar.js. Doing this restricts the portability of -your code, making it specific to your computer’s file system and potentially causing issues when the code is distributed, for example, through NPM -packages.

      +

      In Node.js, it’s possible to import modules by specifying an absolute path, such as /lib/foo/bar.js. However, this approach can limit +the portability of your code, as it becomes tied to your computer’s file system. This could potentially lead to problems when the code is distributed, +for instance, via NPM packages. Therefore, it’s advisable to use relative paths or module names for importing modules to enhance the portability and +compatibility of your code across different systems.

      How to fix it

      Replace the absolute path with one that is relative to your current file.

      Code examples

      diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6861.html b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6861.html index b6f2f080731..ccecc58a20c 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6861.html +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/S6861.html @@ -36,6 +36,7 @@

      Resources

      Documentation

      diff --git a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/Sonar_way_profile.json b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/Sonar_way_profile.json index ea601840b77..1ba209aac8a 100644 --- a/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/Sonar_way_profile.json +++ b/sonar-plugin/javascript-checks/src/main/resources/org/sonar/l10n/javascript/rules/javascript/Sonar_way_profile.json @@ -178,7 +178,6 @@ "S5736", "S5739", "S5742", - "S5743", "S5757", "S5759", "S5842", @@ -198,7 +197,6 @@ "S6079", "S6080", "S6092", - "S6245", "S6249", "S6252", "S6265", diff --git a/sonarpedia.json b/sonarpedia.json index 49ad2705b3d..50da762af96 100644 --- a/sonarpedia.json +++ b/sonarpedia.json @@ -3,7 +3,7 @@ "languages": [ "JS" ], - "latest-update": "2023-11-22T14:26:39.901476Z", + "latest-update": "2023-12-21T17:10:12.037032Z", "options": { "no-language-in-filenames": true, "preserve-filenames": true