mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
javascript: Add support for document.defaultView in global variable references
Updated the data flow analysis to include `document.defaultView` as a source node for global variable references. Added a new test file `tst4.js` and updated existing tests to verify the inclusion of `defaultView` and its properties in the expected results.
This commit is contained in:
@@ -383,6 +383,9 @@ DataFlow::SourceNode globalObjectRef() {
|
||||
// DOM
|
||||
result = globalVariable("window")
|
||||
or
|
||||
// DOM alias via `document.defaultView`
|
||||
result = globalVariable("document").getAPropertyReference("defaultView")
|
||||
or
|
||||
// Node.js
|
||||
result = globalVariable("global")
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user