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

Module AdditionalFlowSteps

This contains three step-contribution classes, in order to support graceful deprecation of the old data flow library.

  • class AdditionalFlowStep: steps used only by the new dataflow library
  • class LegacyFlowStep: steps used only by the old data flow library
  • class SharedFlowStep: steps used by both

The latter two will be deprecated in the future, but are currently not marked as deprecated. This is because a library model should be able to support both data flow libraries simultaneously, without itself getting deprecation warnings.

To simplify correct consumption of these steps there is a correspondingly-named module for each:

  • module AdditionalFlowStep: exposes steps from AdditionalFlowStep and SharedFlowStep subclasses.
  • module LegacyFlowStep: exposes steps from LegacyFlowStep and SharedFlowStep subclasses.
  • module SharedFlowStep: exposes steps from all three classes.

This design is intended to simplify consumption of steps, and to ensure existing consumers of SharedFlowStep outside this codebase will continue to work with as few surprises as possible.

Import path

import semmle.javascript.dataflow.AdditionalFlowSteps

Classes

AdditionalFlowStep

A value-preserving data flow edge that should be used in all data flow configurations in addition to standard data flow edges.

LegacyFlowStep

A data flow edge that is only seen by the old, deprecated data flow library.

SharedFlowStep

A data flow edge that should be added to all data flow configurations in addition to standard data flow edges.

Modules

AdditionalFlowStep

Contains predicates for accessing the steps contributed by AdditionalFlowStep and SharedFlowStep subclasses.

LegacyFlowStep

Contains predicates for accessing the steps contributed by LegacyFlowStep and SharedFlowStep subclasses.

SharedFlowStep

Contains predicates for accessing the steps contributed by SharedFlowStep, LegacyFlowStep, and AdditionalFlowStep subclasses.