We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01b1e8a commit cc98de5Copy full SHA for cc98de5
javascript/ql/lib/semmle/javascript/internal/NameResolution.qll
@@ -102,6 +102,13 @@ module NameResolution {
102
node2 = exprt.getImportedPath()
103
)
104
or
105
+ // For imports like `require()` that are just expressions evaluating to the imported module.
106
+ exists(Import imprt |
107
+ imprt.getImportedModuleNode() = DataFlow::valueNode(imprt) and
108
+ node1 = imprt.getImportedPathExpr() and
109
+ node2 = imprt
110
+ )
111
+ or
112
exists(ImportNamespaceSpecifier spec |
113
node1 = spec.getImportDeclaration().getImportedPathExpr() and
114
node2 = spec.getLocal()
0 commit comments