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.
define(..)
1 parent 3ca6701 commit 28eef26Copy full SHA for 28eef26
javascript/ql/src/semmle/javascript/PackageExports.qll
@@ -67,7 +67,8 @@ private DataFlow::Node getAValueExportedByPackage() {
67
exists(ImmediatelyInvokedFunctionExpr func, DataFlow::ParameterNode prev, int i |
68
prev.getName() = "factory" and
69
func.getParameter(i) = prev.getParameter() and
70
- result = func.getInvocation().getArgument(i).flow().getAFunctionValue().getAReturn()
+ result = func.getInvocation().getArgument(i).flow().getAFunctionValue().getAReturn() and
71
+ DataFlow::globalVarRef("define").getACall().getArgument(1) = prev.getALocalUse()
72
)
73
or
74
// the exported value is a call to a unique callee
0 commit comments