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:
eliav
2025-11-17 00:52:06 +02:00
parent fabcd044d6
commit 30cc91421d
4 changed files with 9 additions and 0 deletions

View File

@@ -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