Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f453fe2 commit c103939Copy full SHA for c103939
1 file changed
javascript/ql/src/semmle/javascript/NodeJS.qll
@@ -228,6 +228,13 @@ private predicate isCreateRequire(DataFlow::Node nd) {
228
nd = prop.getValuePattern().flow()
229
)
230
or
231
+ exists(ImportDeclaration decl, NamedImportSpecifier spec |
232
+ decl.getImportedPath().getValue() = "module" and
233
+ spec = decl.getASpecifier() and
234
+ spec.getImportedName() = "createRequire" and
235
+ nd = spec.flow()
236
+ )
237
+ or
238
isCreateRequire(nd.getAPredecessor())
239
}
240
0 commit comments