File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -154,9 +154,9 @@ module GlobalAccessPath {
154154 baseName = fromRhs ( base )
155155 )
156156 or
157- exists ( AssignExpr assign |
158- node = assign . getRhs ( ) .flow ( ) and
159- result = assign . getLhs ( ) . ( GlobalVarAccess ) .getName ( )
157+ exists ( GlobalVariable var |
158+ node = var . getAnAssignedExpr ( ) .flow ( ) and
159+ result = var .getName ( )
160160 )
161161 or
162162 exists ( FunctionDeclStmt fun |
@@ -168,6 +168,16 @@ module GlobalAccessPath {
168168 node = DataFlow:: valueNode ( cls ) and
169169 result = cls .getIdentifier ( ) .( GlobalVarDecl ) .getName ( )
170170 )
171+ or
172+ exists ( EnumDeclaration decl |
173+ node = DataFlow:: valueNode ( decl ) and
174+ result = decl .getIdentifier ( ) .( GlobalVarDecl ) .getName ( )
175+ )
176+ or
177+ exists ( NamespaceDeclaration decl |
178+ node = DataFlow:: valueNode ( decl ) and
179+ result = decl .getId ( ) .( GlobalVarDecl ) .getName ( )
180+ )
171181 }
172182
173183 /**
You can’t perform that action at this time.
0 commit comments