File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
python/ql/src/semmle/python/dataflow/new/internal Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,15 @@ private import DataFlowPrivate
33
33
class LocalSourceNode extends Node {
34
34
cached
35
35
LocalSourceNode ( ) {
36
- not simpleLocalFlowStep ( _, this ) and
37
- // Currently, we create synthetic post-update nodes for
38
- // - arguments to calls that may modify said argument
39
- // - direct reads a writes of object attributes
40
- // Both of these preserve the identity of the underlying pointer, and hence we exclude these as
41
- // local source nodes.
42
- // We do, however, allow the post-update nodes that arise from object creation (which are non-synthetic).
43
- not this instanceof SyntheticPostUpdateNode
36
+ this instanceof ExprNode and
37
+ not simpleLocalFlowStep ( _, this )
44
38
or
39
+ // Module variable nodes must be local source nodes, otherwise type trackers cannot step through
40
+ // them.
41
+ this instanceof ModuleVariableNode
42
+ or
43
+ // We explicitly include any read of a global variable, as some of these may have local flow going
44
+ // into them.
45
45
this = any ( ModuleVariableNode mvn ) .getARead ( )
46
46
}
47
47
You can’t perform that action at this time.
0 commit comments