Skip to content

Commit

Permalink
Update rule metadata for version 3.7 (#601)
Browse files Browse the repository at this point in the history
* Update rule metadata for version 3.7

* Fix meta data json
  • Loading branch information
nils-werner-sonarsource authored Jul 24, 2020
1 parent 4adfdca commit cde3658
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ <h2>Compliant Solution</h2>
echo $e;
}
</pre>

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"constantCost": "5min"
},
"tags": [

"unused"
],
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-1045",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,23 @@
"constantCost": "20min"
},
"tags": [

"cwe",
"owasp-a6",
"sans-top25-porous",
"owasp-a3"
],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-2277",
"sqKey": "S2277",
"scope": "Main"
"scope": "Main",
"securityStandards": {
"CWE": [
780,
327
],
"OWASP": [
"A3",
"A6"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,21 @@
"constantCost": "20min"
},
"tags": [

"cwe",
"owasp-a6",
"sans-top25-porous"
],
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-2278",
"sqKey": "S2278",
"scope": "Main"
"scope": "Main",
"securityStandards": {
"CWE": [
326,
327
],
"OWASP": [
"A6"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,10 @@
"type": "SECURITY_HOTSPOT",
"status": "ready",
"tags": [
"cwe",
"owasp-a1",
"regex"

],
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-4784",
"sqKey": "S4784",
"scope": "Main",
"securityStandards": {
"CWE": [
624,
185
],
"OWASP": [
"A1"
]
}
"scope": "Main"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"cwe",
"privacy",
"owasp-a6",
"sans-top25-porous"
"sans-top25-porous",
"owasp-a3"
],
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-5542",
Expand All @@ -18,7 +19,8 @@
780
],
"OWASP": [
"A6"
"A6",
"A3"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"tags": [
"cwe",
"privacy",
"owasp-a6",
"sans-top25-porous",
"owasp-a3"
],
Expand All @@ -18,7 +19,8 @@
326
],
"OWASP": [
"A3"
"A3",
"A6"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"title": "Raised Exceptions must derive from Throwable",
"type": "BUG",
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "5min"
},
"tags": [

],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
try to catch such objects within a "try-catch" block.</p>
<p>Many built-in exceptions such as "Exception" and the SPL exception classes do implement the "Throwable" interface and can be extended when creating
custom exceptions.</p>
<p>This rule raises an issue when the classes used to specify the type of objects to be caught in a "try-catch" block do not derive from "Throwable" .</p>
<p>This rule raises an issue when the classes used to specify the type of objects to be caught in a "try-catch" block do not derive from "Throwable"
.</p>
<h2>Noncompliant Code Example</h2>
<pre>
class NoThrowable {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"title": "Caught Exceptions must derive from Throwable",
"type": "BUG",
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "5min"
},
"tags": [
"python3"
"unused"
],
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-5708",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"title": "A subclass should not be in the same \"catch\" clause as a parent class",
"type": "CODE_SMELL",
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "1min"
},
"tags": [
"unused"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "10min"
"constantCost": "5min"
},
"tags": [
"pitfall"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
"S4433",
"S4507",
"S4524",
"S4784",
"S4790",
"S4792",
"S4824",
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": [
"PHP"
],
"latest-update": "2020-07-03T15:14:58.544730Z",
"latest-update": "2020-07-24T11:59:13.249779Z",
"options": {
"no-language-in-filenames": true,
"preserve-filenames": true
Expand Down

0 comments on commit cde3658

Please sign in to comment.