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

Module DataFlow

Provides classes for working with a data flow graph-based program representation.

We currently consider three kinds of data flow:

  1. Flow within an expression, for example from the operands of a && expression to the expression itself.
  2. Flow through local variables, that is, from definitions to uses. Captured variables are treated flow-insensitively, that is, all definitions are considered to flow to all uses, while for non-captured variables only definitions that can actually reach a use are considered.
  3. Flow into and out of immediately invoked function expressions, that is, flow from arguments to parameters, and from returned expressions to the function expression itself.

Flow through global variables, object properties or function calls is not modeled (except for immediately invoked functions as explained above).

Import path

import semmle.javascript.dataflow.DataFlow

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Modules