Skip to content

Commit 6c6b606

Browse files
committed
Dataflow: Add consistency check.
1 parent 8b99154 commit 6c6b606

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

shared/dataflow/codeql/dataflow/internal/DataFlowImplConsistency.qll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,18 @@ module MakeConsistency<
323323
lambdaCall(call, _, receiver) and
324324
not nodeGetEnclosingCallable(receiver) = call.getEnclosingCallable()
325325
}
326+
327+
query predicate speculativeStepAlreadyHasModel(Node n1, Node n2, string model) {
328+
speculativeTaintStep(n1, n2) and
329+
not defaultAdditionalTaintStep(n1, n2, _) and
330+
(
331+
simpleLocalFlowStep(n1, n2, _) and model = "SimpleLocalFlowStep"
332+
or
333+
exists(DataFlowCall call |
334+
exists(viableCallable(call)) and
335+
isArgumentNode(n1, call, _) and
336+
model = "dispatch"
337+
)
338+
)
339+
}
326340
}

0 commit comments

Comments
 (0)