mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Python: Support flow through import *
Adds result for `ModuleVariableNode::getARead` corresponding to reads that go through (chains of) `import *`. This required a bit of a change to _which_ module variables we define. Previously, we only included variables that were accessed elsewhere in the same file, but now we must ensure to also include variables that may be accessed through `import *`.
This commit is contained in:
@@ -1 +1 @@
|
||||
known_attr = [1000]
|
||||
known_attr = [1000] #$ writes=known_attr
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
moduleVariables
|
||||
| three.py:0:0:0:0 | ModuleVariableNode for three.foo |
|
||||
| trois.py:0:0:0:0 | ModuleVariableNode for trois.foo |
|
||||
reads
|
||||
| three.py:0:0:0:0 | ModuleVariableNode for three.foo | test1.py:2:7:2:9 | ControlFlowNode for foo |
|
||||
| three.py:0:0:0:0 | ModuleVariableNode for three.foo | two.py:2:7:2:9 | ControlFlowNode for foo |
|
||||
| trois.py:0:0:0:0 | ModuleVariableNode for trois.foo | deux.py:2:7:2:9 | ControlFlowNode for foo |
|
||||
| trois.py:0:0:0:0 | ModuleVariableNode for trois.foo | test2.py:2:7:2:9 | ControlFlowNode for foo |
|
||||
writes
|
||||
| three.py:1:1:1:3 | GSSA Variable foo | three.py:0:0:0:0 | ModuleVariableNode for three.foo |
|
||||
| trois.py:1:1:1:3 | GSSA Variable foo | trois.py:0:0:0:0 | ModuleVariableNode for trois.foo |
|
||||
|
||||
Reference in New Issue
Block a user