Skip to content

Commit 4153a83

Browse files
committed
Python: Add workaround.
1 parent 42d35f8 commit 4153a83

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ private module SpeculativeTaintFlow {
233233
predicate speculativeTaintStep(DataFlow::Node src, DataFlow::Node sink) {
234234
exists(DataFlowDispatch::DataFlowCall call, DataFlowDispatch::ArgumentPosition argpos |
235235
// TODO: exclude neutrals and anything that has QL modeling.
236-
not exists(DataFlowDispatch::viableCallable(call)) and
236+
not exists(DataFlowDispatch::DataFlowCall call0 |
237+
// Workaround for the fact that python currently associates several
238+
// DataFlowCalls with a single call.
239+
src.(DataFlowPublic::ArgumentNode).argumentOf(call0, _) and
240+
exists(DataFlowDispatch::viableCallable(call0))
241+
) and
237242
call instanceof DataFlowDispatch::PotentialLibraryCall and
238243
src.(DataFlowPublic::ArgumentNode).argumentOf(call, argpos)
239244
|

0 commit comments

Comments
 (0)