mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
JS: raise precision of global accesses
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
import javascript
|
||||
private import semmle.javascript.Closure
|
||||
|
||||
module DataFlow {
|
||||
cached
|
||||
@@ -1039,7 +1040,10 @@ module DataFlow {
|
||||
or
|
||||
exists(GlobalVarAccess va |
|
||||
nd = valueNode(va.(VarUse)) and
|
||||
cause = "global"
|
||||
if isClosureLibraryNamespacePath(va.getName()) then
|
||||
cause = "heap"
|
||||
else
|
||||
cause = "global"
|
||||
)
|
||||
or
|
||||
exists(Expr e | e = nd.asExpr() and cause = "call" |
|
||||
|
||||
Reference in New Issue
Block a user