File tree Expand file tree Collapse file tree
python/ql/src/experimental/semmle/python Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,16 +76,3 @@ class RegexEscape extends DataFlow::Node {
7676
7777 DataFlow:: CallCfgNode getEscapeMethod ( ) { result = range .getEscapeMethod ( ) }
7878}
79-
80- class RegexInjectionSink extends DataFlow:: Node {
81- Attribute regexMethod ;
82-
83- RegexInjectionSink ( ) {
84- exists ( RegexExecution reExec |
85- this = reExec .getRegexNode ( ) and
86- regexMethod = reExec .getRegexMethod ( ) .getFunction ( ) .asExpr ( ) .( Attribute )
87- )
88- }
89-
90- Attribute getRegexMethod ( ) { result = regexMethod }
91- }
Original file line number Diff line number Diff line change @@ -9,6 +9,19 @@ import semmle.python.dataflow.new.DataFlow
99import semmle.python.dataflow.new.TaintTracking
1010import semmle.python.dataflow.new.RemoteFlowSources
1111
12+ class RegexInjectionSink extends DataFlow:: Node {
13+ Attribute regexMethod ;
14+
15+ RegexInjectionSink ( ) {
16+ exists ( RegexExecution reExec |
17+ this = reExec .getRegexNode ( ) and
18+ regexMethod = reExec .getRegexMethod ( ) .getFunction ( ) .asExpr ( ) .( Attribute )
19+ )
20+ }
21+
22+ Attribute getRegexMethod ( ) { result = regexMethod }
23+ }
24+
1225/**
1326 * A taint-tracking configuration for detecting regular expression injections.
1427 */
You can’t perform that action at this time.
0 commit comments