JS: Ignore Angular templates in a few non-security queries

This commit is contained in:
Asger Feldthaus
2021-01-27 10:59:16 +00:00
parent aec0e9808b
commit 1637b72092
4 changed files with 10 additions and 3 deletions

View File

@@ -164,5 +164,7 @@ predicate hasNoEffect(Expr e) {
top = e.getParent().(ExprStmt).getParent() and
top.getNumChild() = 1 and
not exists(Function fun | fun.getEnclosingContainer() = top)
)
) and
// ignore Angular templates
not e.getTopLevel() instanceof Angular2::TemplateTopLevel
}