JS: raise precision of global accesses

This commit is contained in:
Asger F
2019-01-23 19:12:56 +00:00
parent 9589ccd40d
commit 6a63c3f149
3 changed files with 29 additions and 25 deletions

View File

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