Skip to content

Commit

Permalink
Update rule metadata for 3.15 (#1150)
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-werner-sonarsource authored Jun 10, 2022
1 parent aaf14c7 commit 4fbf8ba
Show file tree
Hide file tree
Showing 39 changed files with 211 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
],
"OWASP Top 10 2021": [
"A3"
],
"PCI DSS 3.2": [
"6.5.1"
],
"PCI DSS 4.0": [
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
563
]
},
"quickfix": "unknown"
"quickfix": "covered"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"ruleSpecification": "RSPEC-1940",
"sqKey": "S1940",
"scope": "All",
"quickfix": "unknown"
"quickfix": "covered"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
],
"OWASP Top 10 2021": [
"A2"
],
"PCI DSS 3.2": [
"6.5.10"
],
"PCI DSS 4.0": [
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
],
"OWASP Top 10 2021": [
"A7"
],
"PCI DSS 3.2": [
"6.5.10"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
],
"OWASP Top 10 2021": [
"A3"
],
"PCI DSS 3.2": [
"6.5.1"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
"OWASP Top 10 2021": [
"A4",
"A5"
],
"PCI DSS 3.2": [
"6.5.10"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
],
"OWASP Top 10 2021": [
"A7"
],
"PCI DSS 3.2": [
"6.5.10"
],
"PCI DSS 4.0": [
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"OWASP Top 10 2021": [
"A1",
"A4"
],
"PCI DSS 3.2": [
"6.5.8"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"ruleSpecification": "RSPEC-2710",
"sqKey": "S2710",
"scope": "Main",
"quickfix": "unknown"
"quickfix": "covered"
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
],
"OWASP Top 10 2021": [
"A5"
],
"PCI DSS 3.2": [
"6.5.1"
],
"PCI DSS 4.0": [
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
],
"OWASP Top 10 2021": [
"A5"
],
"PCI DSS 3.2": [
"6.5.10"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
"OWASP Top 10 2021": [
"A1",
"A4"
],
"PCI DSS 3.2": [
"6.5.8"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"ruleSpecification": "RSPEC-3923",
"sqKey": "S3923",
"scope": "All",
"quickfix": "unknown"
"quickfix": "covered"
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
"OWASP Top 10 2021": [
"A2",
"A7"
],
"PCI DSS 3.2": [
"4.1",
"6.5.4"
],
"PCI DSS 4.0": [
"4.2.1",
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
],
"OWASP Top 10 2021": [
"A7"
],
"PCI DSS 3.2": [
"6.5.10"
],
"PCI DSS 4.0": [
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
],
"OWASP Top 10 2021": [
"A1"
],
"PCI DSS 3.2": [
"6.5.9"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
],
"OWASP Top 10 2021": [
"A2"
],
"PCI DSS 3.2": [
"3.4",
"6.5.3",
"6.5.4"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
],
"OWASP Top 10 2021": [
"A9"
],
"PCI DSS 3.2": [
"10.1",
"10.2",
"10.3"
],
"PCI DSS 4.0": [
"10.2"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@
"A2",
"A5",
"A7"
],
"PCI DSS 3.2": [
"4.1",
"6.5.4",
"6.5.10"
],
"PCI DSS 4.0": [
"4.2.1",
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
"OWASP Top 10 2021": [
"A5",
"A7"
],
"PCI DSS 3.2": [
"6.5.8"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
],
"OWASP Top 10 2021": [
"A3"
],
"PCI DSS 3.2": [
"6.5.7"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
],
"OWASP Top 10 2021": [
"A2"
],
"PCI DSS 3.2": [
"4.1",
"6.5.4"
],
"PCI DSS 4.0": [
"4.2.1",
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
or pattern.</p>
<h2>Noncompliant Code Example</h2>
<pre>
input = "Bob is a Bird... Bob is a Plane... Bob is Superman!"
changed = re.sub("Bob is", "It's", input) # Noncompliant
changed = re.sub("\.\.\.", ";", changed) # Noncompliant
init = "Bob is a Bird... Bob is a Plane... Bob is Superman!"
changed = re.sub(r"Bob is", "It's", init) # Noncompliant
changed = re.sub(r"\.\.\.", ";", changed) # Noncompliant
</pre>
<h2>Compliant Solution</h2>
<pre>
input = "Bob is a Bird... Bob is a Plane... Bob is Superman!"
changed = str.replace("Bob is", "It's", input)
changed = str.replace("...", ";", changed)
init = "Bob is a Bird... Bob is a Plane... Bob is Superman!"
changed = init.replace("Bob is", "It's")
changed = changed.replace("...", ";")
</pre>
<p>Or, with a regex:</p>
<pre>
input = "Bob is a Bird... Bob is a Plane... Bob is Superman!"
changed = re.sub(r"\w*\sis", "It's", input)
init = "Bob is a Bird... Bob is a Plane... Bob is Superman!"
changed = re.sub(r"\w*\sis", "It's", init)
changed = re.sub(r"\.{3}", ";", changed)
</pre>

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
],
"OWASP Top 10 2021": [
"A1"
],
"PCI DSS 3.2": [
"6.5.8"
],
"PCI DSS 4.0": [
"6.2.4"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
],
"OWASP Top 10 2021": [
"A1"
],
"PCI DSS 3.2": [
"6.5.8"
],
"PCI DSS 4.0": [
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@
"A2",
"A5",
"A7"
],
"PCI DSS 3.2": [
"4.1",
"6.5.4",
"6.5.10"
],
"PCI DSS 4.0": [
"4.2.1",
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
],
"OWASP Top 10 2021": [
"A2"
],
"PCI DSS 3.2": [
"4.1",
"6.5.3",
"6.5.4"
],
"PCI DSS 4.0": [
"4.2.1",
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
],
"OWASP Top 10 2021": [
"A2"
],
"PCI DSS 3.2": [
"4.1",
"6.5.3",
"6.5.4"
],
"PCI DSS 4.0": [
"4.2.1",
"6.2.4"
]
},
"quickfix": "unknown"
Expand Down
Loading

0 comments on commit 4fbf8ba

Please sign in to comment.