File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
query-tests/Security/CWE-020 Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ predicate used_as_regex(Expr s, string mode) {
28
28
/* Call to re.xxx(regex, ... [mode]) */
29
29
exists ( CallNode call , string name |
30
30
call .getArg ( 0 ) .refersTo ( _, _, s .getAFlowNode ( ) ) and
31
- call .getFunction ( ) .pointsTo ( Module:: named ( "re" ) .attr ( name ) )
31
+ call .getFunction ( ) .pointsTo ( Module:: named ( "re" ) .attr ( name ) ) and
32
+ not name = "escape"
32
33
|
33
34
mode = "None"
34
35
or
Original file line number Diff line number Diff line change 62
62
re .compile (r"\[(?P<txt>[^[]*)\]\((?P<uri>[^)]*)" )
63
63
64
64
re .compile ("" , re .M ) # ODASA-8056
65
+
66
+ # FP reported in https://github.com/github/codeql/issues/3712
67
+ # This does not define a regex (but could be used by other code to do so)
68
+ escaped = re .escape ("https://www.humblebundle.com/home/library" )
Original file line number Diff line number Diff line change @@ -17,3 +17,7 @@ def safe(request):
17
17
target = request .args .get ('target' , '' )
18
18
if SAFE_REGEX .match (target ):
19
19
return redirect (target )
20
+
21
+ # FP reported in https://github.com/github/codeql/issues/3712
22
+ # This does not define a regex (but could be used by other code to do so)
23
+ escaped = re .escape ("https://www.humblebundle.com/home/library" )
You can’t perform that action at this time.
0 commit comments