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

Module InterProceduralPointsTo

Import path

import semmle.python.pointsto.PointsTo

Predicates

call
callWithContext
call_points_to
callsite_calls_function

Holds if the call with context caller calls the function scope in context callee and the offset from argument to parameter is parameter_offset

callsite_points_to

Points-to for a variable (possibly) redefined by a call: var = ...; foo(); use(var) Where var may be redefined in call to foo if var escapes (is global or non-local).

named_argument_transfer

Holds if the named argument given the context caller is transferred to the parameter param with context callee by a call.

neverReturns

INTERNAL – Use FunctionObject.neverReturns() instead. Whether function func never returns. Slightly conservative approximation, this predicate may be false for a function that can never return.

parameter_points_to

Points-to for parameter. def foo(param): ....

positional_argument_points_to

Holds if the nth argument in call call with context caller points-to value from origin, including values in tuples expanded by a * argument. For example, for the call f('a', *(x,y)) the arguments are ('a', 'x', y')

scope_entry_value_transfer

Model the transfer of values at scope-entry points. Transfer from (pred_var, pred_context) to (succ_def, succ_context).

selfMethodCall
varargs_tuple

Holds if call in context caller calls into the function scope scope in context callee and that the number of position arguments (including expansion of * argument) exceeds the number of positional arguments by length and that the excess arguments start at start.