Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS-382 Update rule metadata #4959

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion css-sonarpedia/sonarpedia.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"languages": [
"CSS"
],
"latest-update": "2024-11-15T08:36:47.923296Z",
"latest-update": "2024-11-28T13:47:50.801838Z",
"options": {
"no-language-in-filenames": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"func": "Constant\/Issue",
"constantCost": "1min"
},
"defaultSeverity": "Minor",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-1441",
"sqKey": "S1441",
"scope": "Main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [],
"defaultSeverity": "Critical",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-2310",
"sqKey": "S2310",
"scope": "Main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [],
"defaultSeverity": "Critical",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-3523",
"sqKey": "S3523",
"scope": "Main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "2min"
},
"tags": [],
"defaultSeverity": "Minor",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-3723",
"sqKey": "S3723",
"scope": "Main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ <h2>Ask Yourself Whether</h2>
<p>There is a risk if you answered yes to this question.</p>
<h2>Recommended Secure Coding Practices</h2>
<p>Use <code>noopener</code> to prevent untrusted pages from abusing <code>window.opener</code>.</p>
<p>Note: In Chrome 88+, Firefox 79+ or Safari 12.1+ <code>target=_blank</code> on anchors implies <code>rel=noopener</code> which make the protection
enabled by default.</p>
<h2>Sensitive Code Example</h2>
<pre>
window.open("https://example.com/dangerous"); // Sensitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<p>This rule is deprecated, and will eventually be removed.</p>
<p>Vue.js framework prevents XSS vulnerabilities by automatically escaping HTML contents with the use of native API browsers like
<code>innerText</code> instead of <code>innerHtml</code>.</p>
<p>It’s still possible to explicity use <code>innerHtml</code> and similar APIs to render HTML. Accidentally rendering malicious HTML data will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"attribute": "CONVENTIONAL"
},
"status": "ready",
"status": "deprecated",
"tags": [
"cwe"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ <h2>Ask Yourself Whether</h2>
</ul>
<p>There is a risk if you answered yes to any of those questions.</p>
<h2>Recommended Secure Coding Practices</h2>
<p>It’s recommended to encrypt SNS topics that contain sensitive information. Encryption and decryption are handled transparently by SNS, so no
further modifications to the application are necessary.</p>
<p>It is recommended to encrypt SNS topics that contain sensitive information.</p>
<p>To do so, create a master key and assign the SNS topic to it. Note that this system does not encrypt the following:</p>
<ul>
<li> Topic metadata (topic name and attributes) </li>
<li> Message metadata (subject, message ID, timestamp, and attributes) </li>
<li> Data protection policy </li>
<li> Per-topic metrics </li>
</ul>
<p>Then, make sure that any publishers have the <code>kms:GenerateDataKey*</code> and <code>kms:Decrypt</code> permissions for the AWS KMS key.</p>
<p>See <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-key-management.html#sns-what-permissions-for-sse">AWS SNS Key Management
Documentation</a> for more information.</p>
<h2>Sensitive Code Example</h2>
<p>For <a href="https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sns.Topic.html"><code>aws_cdk.aws_sns.Topic</code></a></p>
<pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "10min"
"constantCost": "45min"
},
"tags": [
"aws",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tags": [
"es2018"
],
"defaultSeverity": "Minor",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-6661",
"sqKey": "S6661",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [],
"defaultSeverity": "Minor",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-6666",
"sqKey": "S6666",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [],
"defaultSeverity": "Minor",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-6671",
"sqKey": "S6671",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [],
"defaultSeverity": "Minor",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-6676",
"sqKey": "S6676",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [],
"defaultSeverity": "Minor",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-6679",
"sqKey": "S6679",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tags": [
"react"
],
"defaultSeverity": "Major",
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-6749",
"sqKey": "S6749",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [],
"defaultSeverity": "Major",
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-6754",
"sqKey": "S6754",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react",
"type-dependent"
],
"defaultSeverity": "Major",
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-6759",
"sqKey": "S6759",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tags": [
"react"
],
"defaultSeverity": "Major",
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-6767",
"sqKey": "S6767",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tags": [
"react"
],
"defaultSeverity": "Major",
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-6770",
"sqKey": "S6770",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tags": [
"react"
],
"defaultSeverity": "Major",
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-6775",
"sqKey": "S6775",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [],
"defaultSeverity": "Minor",
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-6836",
"sqKey": "S6836",
"scope": "All",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@
"S6270",
"S6275",
"S6281",
"S6299",
"S6302",
"S6303",
"S6308",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void test() throws Exception {
" \"type\": \"CODE_SMELL\",\n" +
" \"name\": \"Quotes for string literals should be used consistently\",\n" +
" \"htmlDescription\": \"\\u003cp\\u003eThis rule is deprecated, and will eventually be removed.\\u003c/p\\u003e\\n\\u003ch2\\u003eWhy is this an issue?\\u003c/h2\\u003e\\n\\u003cp\\u003eThis rule checks that all string literals use the same kind of quotes.\\u003c/p\\u003e\\n\\u003ch3\\u003eNoncompliant code example\\u003c/h3\\u003e\\n\\u003cp\\u003eUsing the parameter default (forcing single quotes):\\u003c/p\\u003e\\n\\u003cpre\\u003e\\nvar firstParameter \\u003d \\\"something\\\"; // Noncompliant\\n\\u003c/pre\\u003e\\n\\u003ch3\\u003eCompliant solution\\u003c/h3\\u003e\\n\\u003cpre\\u003e\\nvar firstParameter \\u003d \\u0027something\\u0027;\\n\\u003c/pre\\u003e\\n\\u003ch3\\u003eExceptions\\u003c/h3\\u003e\\n\\u003cp\\u003eStrings that contain quotes are ignored.\\u003c/p\\u003e\\n\\u003cpre\\u003e\\nlet heSaid \\u003d \\\"Then he said \\u0027What?\\u0027.\\\" // ignored\\nlet sheSaid \\u003d \\u0027\\\"Whatever!\\\" she replied.\\u0027 // ignored\\n\\u003c/pre\\u003e\",\n" +
" \"severity\": \"MINOR\",\n" +
" \"severity\": \"MAJOR\",\n" +
" \"status\": \"DEPRECATED\",\n" +
" \"tags\": [],\n" +
" \"params\": [\n" +
Expand Down
2 changes: 1 addition & 1 deletion sonarpedia.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"languages": [
"JS"
],
"latest-update": "2024-11-15T08:36:20.934286Z",
"latest-update": "2024-11-28T13:46:14.829734Z",
"options": {
"no-language-in-filenames": true,
"preserve-filenames": true
Expand Down