CodeQL library for Python
codeql/python-all 0.12.0 (changelog, source)
Search

Module TypeTrackerSpecific

Provides Python-specific definitions for use in the type tracker library.

Import path

import semmle.python.dataflow.new.internal.TypeTrackerSpecific

Predicates

basicWithContentStep

Holds if type-tracking should step from nodeFrom to nodeTo if inside a content matched by filter.

basicWithoutContentStep

Holds if type-tracking should step from nodeFrom to nodeTo but block flow of contents matched by filter through here.

compatibleContents
levelStepCall

Holds if there is a level step from nodeFrom to nodeTo, which may depend on the call graph.

noContent

Gets the content string representing no value.

Classes

Boolean

A utility class that is equivalent to boolean but does not require type joining.

ContentFilter

A label to use for WithContent and WithoutContent steps, restricting which ContentSet may pass through. Not currently used in Python.

OptionalTypeTrackerContent

A content name for use by type trackers, or the empty string.

TypeTrackerContent

A content name for use by type trackers.

Aliases

Node

An element, viewed as a node in a data flow graph. Either an SSA variable (EssaNode) or a control flow node (CfgNode).

TypeTrackingNode

A node that can be used for type tracking or type back-tracking.

basicLoadStep

Holds if nodeTo is the result of accessing the content content of nodeFrom.

basicLoadStoreStep

Holds if the loadContent of nodeFrom is stored in the storeContent of nodeTo.

basicStoreStep

Holds if nodeFrom is being written to the content content of the object in nodeTo.

callStep

Holds if nodeFrom steps to nodeTo by being passed as a parameter in a call.

jumpStep

Holds if data can flow from node1 to node2 in a way that discards call contexts.

levelStepNoCall

Holds if there is a level step from nodeFrom to nodeTo, which does not depend on the call graph.

returnStep

Holds if nodeFrom steps to nodeTo by being returned from a call.

simpleLocalFlowStep

Holds if there is a simple local flow step from nodeFrom to nodeTo