sink

fun sink(token: String, paramIndex: Int, asil: ASIL? = null)

Declare a sink function (data output from this element).

The sink is where tainted data leaks out. PhASAR checks whether the parameter at paramIndex is tainted when this function is called.

Parameters

token

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

paramIndex

Zero-based index of the sink parameter (must be ≥0).

  • 0 = first declared C++ parameter.

  • 1 = second declared C++ parameter.

  • N = (N+1)-th declared C++ parameter. For static functions, index 0 is the first parameter in the signature. For non-static member functions, this is implicit and not counted — index 0 is the first explicitly declared parameter.

asil

ASIL override, or omit to use defaultAsil.