mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +01:00
Move RegexInjectionSink to query config (qll)
This commit is contained in:
@@ -76,16 +76,3 @@ class RegexEscape extends DataFlow::Node {
|
||||
|
||||
DataFlow::CallCfgNode getEscapeMethod() { result = range.getEscapeMethod() }
|
||||
}
|
||||
|
||||
class RegexInjectionSink extends DataFlow::Node {
|
||||
Attribute regexMethod;
|
||||
|
||||
RegexInjectionSink() {
|
||||
exists(RegexExecution reExec |
|
||||
this = reExec.getRegexNode() and
|
||||
regexMethod = reExec.getRegexMethod().getFunction().asExpr().(Attribute)
|
||||
)
|
||||
}
|
||||
|
||||
Attribute getRegexMethod() { result = regexMethod }
|
||||
}
|
||||
|
||||
@@ -9,6 +9,19 @@ import semmle.python.dataflow.new.DataFlow
|
||||
import semmle.python.dataflow.new.TaintTracking
|
||||
import semmle.python.dataflow.new.RemoteFlowSources
|
||||
|
||||
class RegexInjectionSink extends DataFlow::Node {
|
||||
Attribute regexMethod;
|
||||
|
||||
RegexInjectionSink() {
|
||||
exists(RegexExecution reExec |
|
||||
this = reExec.getRegexNode() and
|
||||
regexMethod = reExec.getRegexMethod().getFunction().asExpr().(Attribute)
|
||||
)
|
||||
}
|
||||
|
||||
Attribute getRegexMethod() { result = regexMethod }
|
||||
}
|
||||
|
||||
/**
|
||||
* A taint-tracking configuration for detecting regular expression injections.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user