Skip to content

Commit bf62582

Browse files
committed
JS: Implement 'speculativeTaintStep'
It is a mandatory part of the interface now; just providing a bare-bones implementation for rather than 'none()'
1 parent 82d61e4 commit bf62582

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

javascript/ql/lib/semmle/javascript/dataflow/internal/TaintTrackingPrivate.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,12 @@ predicate defaultImplicitTaintRead(DataFlow::Node node, ContentSet c) {
104104
// Optional steps are added through isAdditionalFlowStep but we don't want the implicit reads
105105
not optionalStep(node, _, _)
106106
}
107+
108+
predicate speculativeTaintStep(DataFlow::Node node1, DataFlow::Node node2) {
109+
exists(DataFlow::CallNode call, DataFlowCall c |
110+
not exists(viableCallable(c)) and
111+
c.asOrdinaryCall() = call and
112+
node1 = call.getAnArgument() and
113+
node2 = call
114+
)
115+
}

0 commit comments

Comments
 (0)