CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.8 (changelog, source)
Search

Predicate CachedSteps::exploratoryCallbackStep

Holds if there is a higher-order call with argument arg, and cb is the local source of an argument that flows into the callee position of that call:

function f(x, g) {
  g(
    x                 // arg
  );
}

function cb() {      // cb
}

f(arg, cb);

This is an over-approximation of a possible data flow step through a callback invocation.

Import path

import semmle.javascript.dataflow.internal.FlowSteps
predicate exploratoryCallbackStep(Node arg, SourceNode cb)