Dataflow: Add consistency check.

This commit is contained in:
Anders Schack-Mulligen
2024-10-03 11:45:41 +02:00
parent 8b99154a00
commit 6c6b6061bc

View File

@@ -323,4 +323,18 @@ module MakeConsistency<
lambdaCall(call, _, receiver) and lambdaCall(call, _, receiver) and
not nodeGetEnclosingCallable(receiver) = call.getEnclosingCallable() not nodeGetEnclosingCallable(receiver) = call.getEnclosingCallable()
} }
query predicate speculativeStepAlreadyHasModel(Node n1, Node n2, string model) {
speculativeTaintStep(n1, n2) and
not defaultAdditionalTaintStep(n1, n2, _) and
(
simpleLocalFlowStep(n1, n2, _) and model = "SimpleLocalFlowStep"
or
exists(DataFlowCall call |
exists(viableCallable(call)) and
isArgumentNode(n1, call, _) and
model = "dispatch"
)
)
}
} }