Skip to content

Commit bfa5d18

Browse files
committed
Python: Use new importNode
1 parent 7d600e4 commit bfa5d18

File tree

1 file changed

+3
-3
lines changed
  • python/ql/src/experimental/semmle/python/frameworks

1 file changed

+3
-3
lines changed

python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ private module Stdlib {
334334
/** Gets a reference to the `builtins` module (called `__builtin__` in Python 2). */
335335
private DataFlow::Node builtins(DataFlow::TypeTracker t) {
336336
t.start() and
337-
result = DataFlow::importModule(["builtins", "__builtin__"])
337+
result = DataFlow::importNode(["builtins", "__builtin__"])
338338
or
339339
exists(DataFlow::TypeTracker t2 | result = builtins(t2).track(t2, t))
340340
}
@@ -350,10 +350,10 @@ private module Stdlib {
350350
attr_name in ["exec", "eval", "compile"] and
351351
(
352352
t.start() and
353-
result = DataFlow::importMember(["builtins", "__builtin__"], attr_name)
353+
result = DataFlow::importNode(["builtins", "__builtin__"] + "." + attr_name)
354354
or
355355
t.startInAttr(attr_name) and
356-
result = DataFlow::importModule(["builtins", "__builtin__"])
356+
result = DataFlow::importNode(["builtins", "__builtin__"])
357357
or
358358
// special handling of builtins, that are in scope without any imports
359359
// TODO: Take care of overrides, either `def eval: ...`, `eval = ...`, or `builtins.eval = ...`

0 commit comments

Comments
 (0)