mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Python: Allow type tracking through comprehensions
- the subscript operator is extended to comprehensions - the capture jump-step is extended to work for the functions generated inside comprehensions
This commit is contained in:
@@ -30,7 +30,7 @@ def test_cgi_FieldStorage_taint():
|
||||
form['key'][0].value, # $ tainted
|
||||
form['key'][0].file, # $ tainted
|
||||
form['key'][0].filename, # $ tainted
|
||||
[field.value for field in form['key']], # $ MISSING: tainted
|
||||
[field.value for field in form['key']], # $ tainted
|
||||
|
||||
# `form.getvalue('key')` will be a list, if multiple fields named "key" are provided
|
||||
form.getvalue('key'), # $ tainted
|
||||
@@ -40,7 +40,7 @@ def test_cgi_FieldStorage_taint():
|
||||
|
||||
form.getlist('key'), # $ tainted
|
||||
form.getlist('key')[0], # $ tainted
|
||||
[field.value for field in form.getlist('key')], # $ MISSING: tainted
|
||||
[field.value for field in form.getlist('key')], # $ tainted
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user