mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
JS: Add self as global object alias
This commit is contained in:
@@ -304,6 +304,9 @@ DataFlow::SourceNode globalObjectRef() {
|
||||
// Node.js
|
||||
result = globalVarRef("global")
|
||||
or
|
||||
// DOM and service workers
|
||||
result = globalVarRef("self")
|
||||
or
|
||||
// `require("global")`
|
||||
result = moduleImport("global")
|
||||
or
|
||||
|
||||
@@ -10,3 +10,4 @@
|
||||
| tst.js:3:1:3:6 | window |
|
||||
| tst.js:4:1:4:6 | window |
|
||||
| tst.js:4:1:4:13 | window.window |
|
||||
| tst.js:5:1:5:4 | self |
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
| document | tst2.js:2:1:2:26 | require ... ument") |
|
||||
| document | tst.js:3:1:3:15 | window.document |
|
||||
| document | tst.js:4:1:4:22 | window. ... ocument |
|
||||
| document | tst.js:5:1:5:13 | self.document |
|
||||
| foo | tst3.js:4:1:4:5 | w.foo |
|
||||
| global | tst2.js:7:1:7:6 | global |
|
||||
| global | tst2.js:8:1:8:6 | global |
|
||||
| goog | tst3.js:1:1:1:4 | goog |
|
||||
| goog | tst3.js:3:9:3:12 | goog |
|
||||
| self | tst.js:5:1:5:4 | self |
|
||||
| setTimeout | tst2.js:5:1:5:12 | g.setTimeout |
|
||||
| window | tst2.js:3:1:3:24 | require ... indow") |
|
||||
| window | tst.js:1:1:1:6 | window |
|
||||
|
||||
@@ -2,3 +2,4 @@ window;
|
||||
this;
|
||||
window.document;
|
||||
window.window.document;
|
||||
self.document;
|
||||
|
||||
Reference in New Issue
Block a user