Skip to content

Commit c37809a

Browse files
committedApr 2, 2025·
Reduce scope of allowImplicitRead to avoid cartesian product.
1 parent 2d6476a commit c37809a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎python/ql/src/Variables/LoopVariableCapture/LoopVariableCapture.ql

+6-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ module EscapingCaptureFlowConfig implements DataFlow::ConfigSig {
6262

6363
predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet cs) {
6464
isSink(node) and
65-
exists(cs)
65+
(
66+
cs instanceof DataFlow::TupleElementContent or
67+
cs instanceof DataFlow::ListElementContent or
68+
cs instanceof DataFlow::SetElementContent or
69+
cs instanceof DataFlow::DictionaryElementAnyContent
70+
)
6671
}
6772
}
6873

0 commit comments

Comments
 (0)
Please sign in to comment.