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 5e2a1ad commit b4b1810Copy full SHA for b4b1810
javascript/ql/lib/semmle/javascript/NodeJS.qll
@@ -53,6 +53,8 @@ class NodeModule extends Module {
53
private DataFlow::SourceNode getExportsSourceNode() {
54
result = DataFlow::ssaDefinitionNode(Ssa::implicitInit(this.getExportsVariable()))
55
or
56
+ result = DataFlow::thisNode(this) // `this` is an alias for `module.exports`
57
+ or
58
result = this.getModuleSourceNode().getAPropertyWrite("exports").getRhs().getALocalSource()
59
60
result = this.getModuleSourceNode().getAPropertyRead("exports")
0 commit comments