Skip to content

Commit

Permalink
JS-382 Update JS rule metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
saberduck committed Nov 28, 2024
1 parent d67b89f commit 5a93253
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 24 deletions.
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
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

0 comments on commit 5a93253

Please sign in to comment.