source

fun source(token: String, paramIndex: Int? = null, asil: ASIL? = null, usage: SourceUsage = SourceUsage.USED)

Declare a source function (data input to this element).

The source is where taint enters the system. By default the return value is tainted ("ret": "source"). Set paramIndex to taint a specific parameter instead (useful when the source writes to a by-reference parameter rather than returning a value).

Parameters

token

Fully qualified function name (e.g. "ns::Class::ReadFoo()").

paramIndex

Zero-based index of the parameter that becomes tainted after the call, or null (default) for return-value semantics.

  • null → return value is tainted ("ret": "source").

  • 0 → first declared parameter becomes tainted ("params": {"source": [0]}).

  • N → (N+1)-th declared parameter becomes tainted.

asil

ASIL override, or omit to use defaultAsil.

usage

Expected data-flow usage / known fact. Defaults to SourceUsage.USED.