mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
JS: add test with undeclared nested access
This commit is contained in:
3
javascript/ql/test/library-tests/Closure/NestedAccess.ql
Normal file
3
javascript/ql/test/library-tests/Closure/NestedAccess.ql
Normal file
@@ -0,0 +1,3 @@
|
||||
import javascript
|
||||
|
||||
select Closure::moduleImport("foo.bar.x.y.z")
|
||||
@@ -0,0 +1,12 @@
|
||||
goog.module('enumuse');
|
||||
|
||||
let fooBar = goog.require('foo.bar');
|
||||
|
||||
fooBar.x.y.z;
|
||||
|
||||
function infinite() {
|
||||
let z = fooBar;
|
||||
while (z) {
|
||||
z = z.x;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user