JavaScript: Introduce localTaintStep predicate.

It's sometimes useful for exploratory queries, and the other languages have it as well.
This commit is contained in:
Max Schaefer
2019-12-02 09:41:49 +00:00
parent 46b6e6d722
commit aeda2d68f8
2 changed files with 10 additions and 0 deletions

View File

@@ -1573,4 +1573,6 @@ module DataFlow {
import Configuration
import TrackedNodes
import TypeTracking
predicate localTaintStep = TaintTracking::localTaintStep/2;
}

View File

@@ -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)
}
}