File tree Expand file tree Collapse file tree
javascript/ql/src/Statements Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ predicate benignContext(Expr e) {
5050 exists ( VoidExpr voidExpr | voidExpr .getOperand ( ) = e )
5151
5252 or
53+ // weeds out calls inside HTML-attributes.
54+ e .getContainer ( ) instanceof CodeInAttribute or
55+ // and JSX-attributes.
56+ e = any ( JSXAttribute attr ) .getValue ( ) or
5357
5458 // It is ok (or to be flagged by another query?) to await a non-async function.
5559 exists ( AwaitExpr await | await .getOperand ( ) = e and benignContext ( await ) )
@@ -83,11 +87,6 @@ predicate callBlacklist(DataFlow::CallNode call) {
8387
8488 // anonymous one-shot closure. Those are used in weird ways and we ignore them.
8589 call .asExpr ( ) = any ( ImmediatelyInvokedFunctionExpr f ) .getInvocation ( ) or
86-
87- // weeds out calls inside html-attributes.
88- call .asExpr ( ) .getParent * ( ) instanceof CodeInAttribute or
89- // and JSX-attributes.
90- call .asExpr ( ) .getParent * ( ) instanceof JSXAttribute or
9190
9291 // Calls on "this" tend to overloaded. So future overloads might start returning something.
9392 call .asExpr ( ) .( MethodCallExpr ) .getReceiver ( ) instanceof ThisExpr or
You can’t perform that action at this time.
0 commit comments