Skip to content

Commit fc43d22

Browse files
committed
Remove global restriction on ModuleVariableNode
This may result in more nodes, but it should still be bounded by the number of global variables in the source code.
1 parent 832d6fb commit fc43d22

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,7 @@ newtype TNode =
7676
node.getNode() = any(Comp c).getIterable()
7777
} or
7878
/** A node representing a global (module-level) variable in a specific module. */
79-
TModuleVariableNode(Module m, GlobalVariable v) {
80-
v.getScope() = m and
81-
(
82-
v.escapes()
83-
or
84-
isAccessedThroughImportStar(m) and
85-
ImportStar::globalNameDefinedInModule(v.getId(), m)
86-
)
87-
} or
79+
TModuleVariableNode(Module m, GlobalVariable v) { v.getScope() = m } or
8880
/**
8981
* A synthetic node representing that an iterable sequence flows to consumer.
9082
*/

0 commit comments

Comments
 (0)