CodeQL library for Java/Kotlin
codeql/java-all 4.0.1-dev (changelog, source)
Search

Module DataFlowPrivate

Import path

import semmle.code.java.dataflow.internal.DataFlowPrivate

Imports

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.

captureValueStep
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.

cloneStep

Holds if n1 is the qualifier of a call to clone() and n2 is the result.

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.

getAnOutNode

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

getContentApprox

Gets an approximated value for content c.

getErasedRepr

Gets a representative (boxed) type for t for the purpose of pruning possible flow. A single type is used for all numeric types to account for numeric conversions, and otherwise the erasure is used.

getNodeType
getSecondLevelScope

Gets the second-level scope containing the node n, if any.

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 through a field or variable capture.

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.

nodeIsHidden

Holds if n should be hidden from path explanations.

readStep

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

storeStep

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

typeStrongerThan
validParameterAliasStep

Classes

CastNode

A node that performs a type cast.

ContentApprox

An approximated Content.

DataFlowCall

A call relevant for data flow. Includes both source calls and synthesized calls.

DataFlowCallable

A callable or scope enclosing some number of data flow nodes. This can either be a source callable, a synthesized callable for which we have a summary model, or a synthetic scope for a field value node.

DataFlowSecondLevelScope

A second-level control-flow scope in a switch or a chained if statement.

DataFlowType
NodeRegion
ReturnKind

A return kind. A return kind describes how a value can be returned from a callable. For Java, this is simply a method return.

SrcCall

A source call, that is, a Call.

SummaryCall

A synthesized call inside a SummarizedCallable.

Aliases

CaptureFlow

Constructs the type ClosureNode and associated step relations, which are intended to be included in the data-flow node and step relations.

CapturedParameter

A parameter that is captured in a closure.

CapturedVariable

A variable that is captured in a closure.

DataFlowExpr

A common super-class that represents all kinds of expressions.

LambdaCallKind

A method is a particular kind of callable.