Skip to content

Commit

Permalink
Update rule metadata (#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-werner-sonarsource authored May 3, 2023
1 parent 45b4d58 commit 974798e
Show file tree
Hide file tree
Showing 47 changed files with 41 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"func": "Constant\/Issue",
"constantCost": "30min"
},
"tags": [
"owasp-a3"
],
"tags": [],
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-1313",
"sqKey": "S1313",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"constantCost": "30min"
},
"tags": [
"cwe",
"owasp-a1"
"cwe"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-1523",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ <h2>Compliant Solution</h2>
echo "Hello";
echo "Hello","World!";
</pre>
<h2>Deprecated</h2>
<p>This rule is deprecated; use {rule:php:S6600} instead.</p>

Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
"title": "Parentheses should not be used for calls to \"echo\"",
"type": "CODE_SMELL",
"status": "ready",
"status": "deprecated",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "2min"
},
"tags": [
"pitfall"
],
"tags": [],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-2041",
"sqKey": "S2041",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"constantCost": "30min"
},
"tags": [
"cwe",
"sans-top25-porous",
"owasp-a3"
"cwe"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-2053",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"constantCost": "30min"
},
"tags": [
"cwe",
"sans-top25-porous",
"owasp-a2"
"cwe"
],
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-2068",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
},
"tags": [
"cwe",
"owasp-a1",
"sans-top25-insecure",
"bad-practice",
"sql"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
},
"tags": [
"cwe",
"privacy",
"sans-top25-porous",
"owasp-a3"
"privacy"
],
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-2092",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"constantCost": "45min"
},
"tags": [
"cwe",
"owasp-a2",
"owasp-a3"
"cwe"
],
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-2115",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"constantCost": "10min"
},
"tags": [
"cwe",
"owasp-a3",
"owasp-m5"
"cwe"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-2245",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
"constantCost": "20min"
},
"tags": [
"cwe",
"owasp-a6",
"sans-top25-porous",
"owasp-a3"
"cwe"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-2277",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"constantCost": "20min"
},
"tags": [
"cwe",
"owasp-a6",
"sans-top25-porous"
"cwe"
],
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-2278",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"constantCost": "5min"
},
"tags": [
"cwe",
"sans-top25-porous",
"owasp-a5"
"cwe"
],
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-2612",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"constantCost": "15min"
},
"tags": [
"cwe",
"owasp-a4"
"cwe"
],
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-2755",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
},
"tags": [
"cwe",
"sans-top25-insecure",
"privacy",
"owasp-a7"
"privacy"
],
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-3330",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"tags": [
"cwe",
"owasp-a6",
"php-ini"
],
"defaultSeverity": "Blocker",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
},
"tags": [
"cwe",
"owasp-a1",
"sans-top25-risky",
"php-ini"
],
"defaultSeverity": "Blocker",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"tags": [
"cwe",
"owasp-a6",
"php-ini"
],
"defaultSeverity": "Major",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"constantCost": "5min"
},
"tags": [
"owasp-a6",
"php-ini"
],
"defaultSeverity": "Blocker",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"tags": [
"cwe",
"owasp-a6",
"php-ini"
],
"defaultSeverity": "Blocker",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
},
"tags": [
"cwe",
"privacy",
"owasp-a6",
"sans-top25-porous",
"owasp-a3",
"owasp-m3"
"privacy"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-4423",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
},
"tags": [
"cwe",
"privacy",
"owasp-a6",
"owasp-a3",
"owasp-m5"
"privacy"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-4426",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"constantCost": "15min"
},
"tags": [
"cwe",
"owasp-a2"
"cwe"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-4433",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"constantCost": "5min"
},
"tags": [
"cwe",
"sans-top25-insecure",
"owasp-a6"
"cwe"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-4502",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"cwe",
"error-handling",
"debug",
"user-experience",
"owasp-a3"
"user-experience"
],
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-4507",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"status": "ready",
"tags": [
"cwe",
"spring",
"owasp-a6",
"sans-top25-porous",
"owasp-a3",
"owasp-m5"
"spring"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-4790",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"type": "SECURITY_HOTSPOT",
"status": "ready",
"tags": [
"cwe",
"owasp-a10",
"sans-top25-porous",
"owasp-a3"
"cwe"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-4792",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
"tags": [
"cwe",
"privacy",
"owasp-a6",
"ssl",
"owasp-a3",
"owasp-m3"
"ssl"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-4830",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ <h2>Compliant Solution</h2>
$filename = $zip-&gt;getNameIndex($i);
$stats = $zip-&gt;statIndex($i);

// Prevent ZipSlip path traversal (S6096)
if (strpos($filename, '../') !== false || substr($filename, 0, 1) === '/') {
throw new Exception();
}
Expand Down Expand Up @@ -117,7 +116,6 @@ <h2>Compliant Solution</h2>
while ($file = zip_read($zip)) {
$filename = zip_entry_name($file);

// Prevent ZipSlip path traversal (S6096)
if (strpos($filename, '../') !== false || substr($filename, 0, 1) === '/') {
throw new Exception();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"constantCost": "10min"
},
"tags": [
"cwe",
"owasp-a6",
"owasp-a5"
"cwe"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-5042",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"type": "SECURITY_HOTSPOT",
"status": "ready",
"tags": [
"cwe",
"owasp-a6",
"sans-top25-porous"
"cwe"
],
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-5122",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"constantCost": "15min"
},
"tags": [
"cwe",
"owasp-a6"
"cwe"
],
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-5328",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"type": "SECURITY_HOTSPOT",
"status": "ready",
"tags": [
"cwe",
"owasp-a3",
"owasp-m3"
"cwe"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-5332",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
"tags": [
"cwe",
"privacy",
"owasp-a6",
"ssl",
"owasp-a3",
"owasp-m3"
"ssl"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-5527",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
},
"tags": [
"cwe",
"privacy",
"owasp-a6",
"sans-top25-porous",
"owasp-a3",
"owasp-m5"
"privacy"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-5542",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
},
"tags": [
"cwe",
"privacy",
"owasp-a6",
"sans-top25-porous",
"owasp-a3",
"owasp-m5"
"privacy"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-5547",
Expand Down
Loading

0 comments on commit 974798e

Please sign in to comment.