JS: Implement 'speculativeTaintStep'

It is a mandatory part of the interface now; just providing a bare-bones implementation for rather than 'none()'
This commit is contained in:
Asger F
2024-11-20 13:58:43 +01:00
parent 82d61e4194
commit bf62582f53

View File

@@ -104,3 +104,12 @@ predicate defaultImplicitTaintRead(DataFlow::Node node, ContentSet c) {
// Optional steps are added through isAdditionalFlowStep but we don't want the implicit reads
not optionalStep(node, _, _)
}
predicate speculativeTaintStep(DataFlow::Node node1, DataFlow::Node node2) {
exists(DataFlow::CallNode call, DataFlowCall c |
not exists(viableCallable(c)) and
c.asOrdinaryCall() = call and
node1 = call.getAnArgument() and
node2 = call
)
}