Module CachedSteps

Implements a set of data flow predicates that are used by multiple predicates and hence should only be computed once.

Import path

import semmle.javascript.dataflow.internal.FlowSteps

Predicates

argumentPassing

Holds if arg is passed as an argument into parameter parm through invocation invk of function f.

basicLoadStep

Holds if there is a load step from pred to succ under property prop, that is, succ is a read of property prop from pred.

basicStoreStep

Holds if there is a store step from pred to succ under property prop, that is, succ is the local source of the base of a write of property prop with right-hand side pred.

callStep

Holds if there is a flow step from pred to succ through parameter passing to a function call.

callback

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:

calls

Holds if invk may invoke f.

callsBound

Holds if invk may invoke a bound version of f with boundArgs already bound.

captures

Holds if f captures the given variable in cap.

exploratoryBoundInvokeStep

Holds if pred may flow to succ through an invocation of a bound function.

globalFlowStep

Holds if there is a flow step from pred to succ through a global variable. Both pred and succ must be in the same file.

identityFunctionStep

A step from pred to succ through a call to an identity function.

propertyFlowStep

Holds if there is a flow step from pred to succ through an object property.

receiverPropWrite

Holds if f may assign rhs to this.prop.

returnStep

Holds if there is a flow step from pred to succ through: - returning a value from a function call, or - throwing an exception out of a function call, or - the receiver flowing out of a constructor call.

returnedPropWrite

Holds if f may return base, which has a write of property prop with right-hand side rhs.