CodeQL library for Go
codeql/go-all 2.1.3 (changelog, source)
Search

Module DataFlowPrivate

Import path

import semmle.go.dataflow.internal.DataFlowPrivate

Imports

Private

Nodes intended for only use inside the data-flow libraries.

Predicates

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.

basicLocalFlowStep

Holds if data flows from nodeFrom to nodeTo in exactly one local (intra-procedural) step, not taking function models into account.

clearsContent

Holds if values stored inside content c are cleared at node n.

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.

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.

getAnOutNode

Gets a node that can read the value returned from call with return kind kind.

getArgument

Gets the ith argument of call c, where the receiver of a method call counts as argument -1.

getContentApprox

Gets an approximated value for content c.

getNodeType

Gets the type of n used for type pruning.

getReturnKind
isUnreachableInCall

Holds if the nodes in nr are unreachable when the call context is call.

jumpStep

Holds if data can flow from node1 to node2 in a way that loses the calling context. For example, this would happen with flow through a global or static variable.

knownSinkModel
knownSourceModel
lambdaCall

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

lambdaCreation

Holds if creation is an expression that creates a lambda of kind kind for c.

localMustFlowStep
neverSkipInPathGraph

Holds if n should never be skipped over in the PathGraph and in path explanations.

nodeIsHidden

Holds if n should be hidden from path explanations.

readStep

Holds if data can flow from node1 to node2 via a read of c. Thus, node1 references an object with a content c whose value ends up in node2.

storeStep

Holds if data can flow from node1 to node2 via an assignment to c. Thus, node2 references an object with a content x that contains the value of node1.

typeStrongerThan

Classes

CastNode

A node that performs a type cast.

DataFlowCall

A function call relevant for data flow.

DataFlowCallable
DataFlowType
NodeRegion
ReturnKind

A return kind. A return kind describes how a value can be returned from a callable. For Go, this is either a return of a single value or of one of multiple values.

Aliases

ContentApprox

An approximated Content.

DataFlowExpr

An expression.

DataFlowSecondLevelScope

The trivial type with a single element.

LambdaCallKind

The trivial type with a single element.