Skip to content

Commit 2d1f2db

Browse files
committed
JS: Track AMD exports
1 parent 04fbb8c commit 2d1f2db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

javascript/ql/lib/semmle/javascript/internal/NameResolution.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ module NameResolution {
333333
exprt.getContainer() = mod and
334334
result = exprt.getOperand()
335335
)
336+
or
337+
result = mod.(AmdModule).getDefine().getFactoryFunction().getAReturnedExpr()
336338
}
337339

338340
/** Gets a node that is bulk-exported from the given module. */
@@ -352,6 +354,8 @@ module NameResolution {
352354
or
353355
readStep(moduleObjectRef(mod), "exports", result)
354356
or
357+
result = mod.(AmdModule).getDefine().getExportsParameter()
358+
or
355359
result = exportsObjectRhsPred(mod)
356360
or
357361
commonStep(exportsObjectAlias(mod), result)

0 commit comments

Comments
 (0)