зеркало из https://github.com/github/codeql.git
JS: Handle RHS in more cases
This commit is contained in:
Родитель
1e5f0a4e2f
Коммит
a13fb8e2ba
|
@ -154,9 +154,9 @@ module GlobalAccessPath {
|
|||
baseName = fromRhs(base)
|
||||
)
|
||||
or
|
||||
exists(AssignExpr assign |
|
||||
node = assign.getRhs().flow() and
|
||||
result = assign.getLhs().(GlobalVarAccess).getName()
|
||||
exists(GlobalVariable var |
|
||||
node = var.getAnAssignedExpr().flow() and
|
||||
result = var.getName()
|
||||
)
|
||||
or
|
||||
exists(FunctionDeclStmt fun |
|
||||
|
@ -168,6 +168,16 @@ module GlobalAccessPath {
|
|||
node = DataFlow::valueNode(cls) and
|
||||
result = cls.getIdentifier().(GlobalVarDecl).getName()
|
||||
)
|
||||
or
|
||||
exists(EnumDeclaration decl |
|
||||
node = DataFlow::valueNode(decl) and
|
||||
result = decl.getIdentifier().(GlobalVarDecl).getName()
|
||||
)
|
||||
or
|
||||
exists(NamespaceDeclaration decl |
|
||||
node = DataFlow::valueNode(decl) and
|
||||
result = decl.getId().(GlobalVarDecl).getName()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче