From 6431228d37663f35c208510ccb1f570eedf0a1ea Mon Sep 17 00:00:00 2001 From: Joe Farebrother Date: Wed, 16 Apr 2025 09:40:01 +0100 Subject: [PATCH] Limit size of allowImplicitRead for performance --- .../Variables/LoopVariableCapture/LoopVariableCaptureQuery.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/src/Variables/LoopVariableCapture/LoopVariableCaptureQuery.qll b/python/ql/src/Variables/LoopVariableCapture/LoopVariableCaptureQuery.qll index ed0c6496141..7f25701cac8 100644 --- a/python/ql/src/Variables/LoopVariableCapture/LoopVariableCaptureQuery.qll +++ b/python/ql/src/Variables/LoopVariableCapture/LoopVariableCaptureQuery.qll @@ -59,7 +59,7 @@ module EscapingCaptureFlowConfig implements DataFlow::ConfigSig { predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet cs) { isSink(node) and ( - cs instanceof DataFlow::TupleElementContent or + cs.(DataFlow::TupleElementContent).getIndex() in [0 .. 10] or cs instanceof DataFlow::ListElementContent or cs instanceof DataFlow::SetElementContent or cs instanceof DataFlow::DictionaryElementAnyContent