CodeQL library for C#
codeql/csharp-all 0.5.5 ( changelog , source )
Search

Module DataFlow

Import path

import csharp

Predicates

assignableDefinitionNode

Gets a node corresponding to the definition def.

exprNode

Gets a node corresponding to expression e.

localExprFlow

Holds if data can flow from e1 to e2 in zero or more local (intra-procedural) steps.

localFlow

Holds if data flows from source to sink in zero or more local (intra-procedural) steps.

parameterNode

Gets the node corresponding to the value of parameter p at function entry.

Classes

AssignableDefinitionNode

A definition, viewed as a node in a data flow graph.

BarrierGuard

DEPRECATED: Use BarrierGuard module instead.

Configuration

A configuration of interprocedural data flow analysis. This defines sources, sinks, and any other configurable aspect of the analysis. Each use of the global data flow library must define its own unique extension of this abstract class. To create a configuration, extend this class with a subclass whose characteristic predicate is a unique singleton string. For example, write

Content

A reference contained in an object. This is either a field, a property, or an element in a collection.

ContentSet

An entity that represents a set of Contents.

ElementContent

A reference to an element in a collection.

ExprNode

An expression, viewed as a node in a data flow graph.

FeatureEqualSourceSinkCallContext

A flow configuration feature that implies that source-sink pairs have some shared existing call context.

FeatureHasSinkCallContext

A flow configuration feature that implies that sinks have some existing call context.

FeatureHasSourceCallContext

A flow configuration feature that implies that sources have some existing call context.

FieldContent

A reference to a field.

FlowFeature

A flow configuration feature for use in Configuration::getAFeature().

FlowStateEmpty

The default state, which is used when the state is unspecified for a source or a sink.

Node

An element, viewed as a node in a data flow graph. Either an expression (ExprNode) or a parameter (ParameterNode).

NonLocalJumpNode

A data flow node that jumps between callables. This can be extended in framework code to add additional data flow steps.

ParameterNode

The value of a parameter at function entry, viewed as a node in a data flow graph.

PathNode

A Node augmented with a call context (except for sinks), an access path, and a configuration. Only those PathNodes that are reachable from a source, and which can reach a sink, are generated.

PropertyContent

A reference to a property.

SyntheticFieldContent

A reference to a synthetic field.

Modules

BarrierGuard

Provides a set of barrier nodes for a guard that validates an expression.

FlowStateString

Provides FlowState = string.

Make

Constructs a standard data flow computation.

MakeWithState

Constructs a data flow computation using flow state.

MergePathGraph

Constructs a PathGraph from two PathGraphs by disjoint union.

Predicate signatures

explorationLimitSig

Gets the exploration limit for hasPartialFlow and hasPartialFlowRev measured in approximate number of interprocedural steps.

guardChecksSig

Holds if the guard g validates the expression e upon evaluating to v.

Type signatures

Module signatures

ConfigSig

An input configuration for data flow.

DataFlowSig

The output of a data flow computation.

PathGraphSig
StateConfigSig

An input configuration for data flow using flow state.

Aliases

FlowState

A state value to track during data flow.

flowsTo
localFlowStep

Holds if data flows from nodeFrom to nodeTo in exactly one local (intra-procedural) step.