Skip to content

Commit a64848c

Browse files
committed
simplify StdLibRegExpInterpretation to only consider re.compile, because the rest is handled by RegexExecution
1 parent 113ce61 commit a64848c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/lib/semmle/python/regex.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private import semmle.python.ApiGraphs
3333
class StdLibRegExpInterpretation extends RegExpInterpretation::Range {
3434
StdLibRegExpInterpretation() {
3535
this =
36-
API::moduleImport("re").getMember(any(string name | name != "escape")).getACall().getArg(0)
36+
API::moduleImport("re").getMember("compile").getACall().getParameter(0, "pattern").asSink()
3737
}
3838
}
3939

0 commit comments

Comments
 (0)