You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: taint is lost through list.extend, list.insert and += , but not list.append #22305
CodeQL's Python taint tracking propagates through list.append, but not through list.extend, list.insert, or += on a list. A security query therefore reports a flow written one way and stays silent on the same flow written another way, where the two differ only in which list-mutation method is used.
I'm reporting the asymmetry rather than the incompleteness: append is clearly modelled, so the other three look like a gap in the same model rather than a deliberate boundary.
Reproducer
Each snippet is the same flow — a request parameter reaching subprocess.call(..., shell=True) — differing only in how the value passes through a list.
the same asymmetry appears with Security/CWE-022/PathInjection.ql and Security/CWE-089/SqlInjection.ql
Controls
acc = [user] and acc.append(user)are reported, so the query, source and sink all work on these files.
A variant where the value comes from a local constant instead of request.args is not reported, so the rule is source-dependent rather than firing on shape.
All files were present in the database source archive, so the silences are misses rather than unanalysed files.
Note
append in Go is tracked as #14116. This is the Python analogue for the other three mutation forms.
Activity
hvitved commentedon Aug 10, 2026
Hi 👋
Thank for reporting, those do indeed look like shortcomings that should be addressed.