mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
JS: Add more bad promise contexts
This commit is contained in:
@@ -46,6 +46,14 @@ predicate isBadPromiseContext(Expr expr) {
|
||||
expr = any(UnaryExpr e).getOperand()
|
||||
or
|
||||
expr = any(UpdateExpr e).getOperand()
|
||||
or
|
||||
expr = any(ConditionalExpr e).getCondition()
|
||||
or
|
||||
expr = any(IfStmt stmt).getCondition()
|
||||
or
|
||||
expr = any(ForInStmt stmt).getIterationDomain()
|
||||
or
|
||||
expr = any(IndexExpr e).getIndex()
|
||||
}
|
||||
|
||||
string tryGetPromiseExplanation(Expr e) {
|
||||
|
||||
Reference in New Issue
Block a user