Skip to content

Commit 1e45fa9

Browse files
committed
JS/Py/Ruby: Add more CWEs to bad-tag-filter queries
CWE-185: Incorrect Regular Expression The software specifies a regular expression in a way that causes data to be improperly matched or compared. https://cwe.mitre.org/data/definitions/185.html CWE-186: Overly Restrictive Regular Expression > A regular expression is overly restrictive, which prevents dangerous values from being detected. > > (...) [this CWE] is about a regular expression that does not match all > values that are intended. (...) https://cwe.mitre.org/data/definitions/186.html From my understanding, CWE-625: Permissive Regular Expression, is not applicable. (since this is about accepting a regex match where there should not be a match).
1 parent a636021 commit 1e45fa9

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

javascript/ql/src/Security/CWE-116/BadTagFilter.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* security
1111
* external/cwe/cwe-116
1212
* external/cwe/cwe-020
13+
* external/cwe/cwe-185
14+
* external/cwe/cwe-186
1315
*/
1416

1517
import semmle.javascript.security.BadTagFilterQuery

python/ql/src/Security/CWE-116/BadTagFilter.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* security
1111
* external/cwe/cwe-116
1212
* external/cwe/cwe-020
13+
* external/cwe/cwe-185
14+
* external/cwe/cwe-186
1315
*/
1416

1517
import semmle.python.security.BadTagFilterQuery

ruby/ql/src/queries/security/cwe-116/BadTagFilter.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* security
1111
* external/cwe/cwe-116
1212
* external/cwe/cwe-020
13+
* external/cwe/cwe-185
14+
* external/cwe/cwe-186
1315
*/
1416

1517
import codeql.ruby.security.BadTagFilterQuery

0 commit comments

Comments
 (0)