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

Module DataFlowPrivate

Import path

import semmle.code.csharp.dataflow.internal.DataFlowPrivate

Imports

ArgumentNodes
Cached

A collection of cached types and predicates to be evaluated in the same stage.

OutNodes
ParameterNodes
ReturnNodes

Predicates

accessPathLimit
additionalLambdaFlowStep

Extra data-flow steps needed for lambda flow analysis.

allowParameterReturnInSelf

Holds if flow is allowed to pass from parameter p and back to itself as a side-effect, resulting in a summary from p to itself.

clearsContent

Holds if values stored inside content c are cleared at node n. For example, any value stored inside f is cleared at the pre-update node associated with x in x.f = newValue.

compatibleTypes

Holds if t1 and t2 are compatible, that is, whether data can flow from a node of type t1 to a node of type t2.

containerContent

Holds if the the content c is a container.

expectsContent

Holds if the value that is being tracked is expected to be stored inside content c at node n.

forceHighPrecision

Holds if access paths with c at their head always should be tracked at high precision. This disables adaptive access path precision for such access paths.

getContentApprox

Gets an approximated value for content c.

getNodeType

Gets the type of n used for type pruning.

hasNodePath

Holds if there is a control-flow path from n1 to n2. n2 is either an expression node or an SSA definition node.

isArgumentNode

Holds if arg is an ArgumentNode of c with position pos.

isParameterNode

Holds if p is a ParameterNode of c with position pos.

isUnreachableInCall

Holds if the node n is unreachable when the call context is call.

jumpStep

Holds if pred can flow to succ, by jumping from one callable to another. Additional steps specified by the configuration are not taken into account.

knownSinkModel
knownSourceModel
lambdaCall

Holds if call is a lambda call where receiver is the lambda expression.

lambdaCreation

Holds if creation is an expression that creates a delegate for c.

nodeGetEnclosingCallable

Gets the callable in which this node occurs.

nodeIsHidden

Holds if n should be hidden from path explanations.

ppReprType

Gets a string representation of a DataFlowType.

readStep

Holds if data can flow from node1 to node2 via a read of content c.

simpleLocalFlowStep

This is the local flow predicate that is used as a building block in global data flow. It excludes SSA flow through instance fields, as flow through fields is handled by the global data-flow library, but includes various other steps that are only relevant for global flow.

storeStep

Holds if data can flow from node1 to node2 via an assignment to content c.

typeStrongerThan

Classes

ArgumentNode

A data-flow node that represents a call argument.

AssignableDefinitionNodeImpl

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

CaptureNode

A synthesized data flow node representing a closure object that tracks captured variables.

CastNode

A node that performs a type cast.

ContentApprox

An approximated Content.

DataFlowType

An entity used to represent the type of data-flow node. Two nodes will have the same DataFlowType when the underlying Types are structurally equal modulo type parameters and identity conversions.

FieldOrProperty

A field or a property.

FieldOrPropertyAccess

An access to a field or a property.

FlowInsensitiveCapturedVariableNode

A data flow node used for control-flow insensitive flow through captured variables.

FlowInsensitiveFieldNode

A data flow node used for control-flow insensitive flow through fields and properties.

FlowSummaryNode

A data-flow node used to model flow summaries.

NodeImpl
OutNode

A data-flow node that represents the output of a call.

ParameterNodeImpl
PostUpdateNode

A node associated with an object after an operation that might have changed its state.

ReturnNode

A data-flow node that represents a value returned by a callable.

SsaDefinitionExtNode

An SSA definition, viewed as a node in a data flow graph.

SyntheticField

A synthetic field.

Modules

LocalFlow

Provides predicates related to local data flow.

PostUpdateNodes
VariableCapture

Provides logic related to captured variables.

Aliases

DataFlowExpr

An expression. Either an access (Access), a call (Call), an object or collection initializer (ObjectOrCollectionInitializer), a delegate creation (DelegateCreation), an array initializer (ArrayInitializer), an array creation (ArrayCreation), an anonymous function (AnonymousFunctionExpr), a local variable declaration (LocalVariableDeclExpr), an operation (Operation), a parenthesized expression (ParenthesizedExpr), a checked expression (CheckedExpr), an unchecked expression (UncheckedExpr), an is expression (IsExpr), an as expression (AsExpr), a cast (CastExpr), a typeof expression (TypeofExpr), a default expression (DefaultValueExpr), an await expression (AwaitExpr), a nameof expression (NameOfExpr), an interpolated string (InterpolatedStringExpr), a qualifiable expression (QualifiableExpr), or a literal (Literal).

LambdaCallKind

The trivial type with a single element.

localMustFlowStep

Holds if the value of node2 is given by node1.