mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
JavaScript: Introduce localTaintStep predicate.
It's sometimes useful for exploratory queries, and the other languages have it as well.
This commit is contained in:
@@ -1573,4 +1573,6 @@ module DataFlow {
|
||||
import Configuration
|
||||
import TrackedNodes
|
||||
import TypeTracking
|
||||
|
||||
predicate localTaintStep = TaintTracking::localTaintStep/2;
|
||||
}
|
||||
|
||||
@@ -885,4 +885,12 @@ module TaintTracking {
|
||||
|
||||
override predicate appliesTo(Configuration cfg) { any() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if taint propagates from `pred` to `succ` in one local (intra-procedural) step.
|
||||
*/
|
||||
predicate localTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
DataFlow::localFlowStep(pred, succ) or
|
||||
any(AdditionalTaintStep s).step(pred, succ)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user