From c0b3d98c6dadad14476c98eceda8878f59a10688 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 18 Dec 2023 22:44:26 +0100 Subject: [PATCH] Python: Add a bit more detail to comment. --- .../lib/semmle/python/dataflow/new/internal/VariableCapture.qll | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll b/python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll index 3ca31be5dcf..1cf752cbd70 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll @@ -10,6 +10,8 @@ private import codeql.dataflow.VariableCapture as Shared // - JS: Capture flow: https://github.com/github/codeql/pull/14412/commits/7bcf8b858babfea0a3e36ce61145954c249e13ac // - JS: Disallow consecutive captured contents: https://github.com/github/codeql/pull/14412/commits/46e4cdc6232604ea7f58138a336d5a222fad8567 // The first is the main implementation, the second is a performance motivated restriction. +// The restriction is to clear any `CapturedVariableContent` before writing a new one +// to avoid long access paths (see the link for a nice explanation). private module CaptureInput implements Shared::InputSig { private import python as PY