SourceFunctionConfig

data class SourceFunctionConfig(val token: String, val paramIndex: Int? = null, val asil: ASIL? = null, val usage: SourceUsage = SourceUsage.USED)

A source function declared in the interfacePoints { } DSL block.

A source is where taint enters the system. PhASAR marks the specified output (return value and/or parameter) as tainted after the function is called.

Parameters

token

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

paramIndex

Zero-based index of the parameter that becomes tainted after the call, or null (default) to use return-value semantics ("ret": "source").

  • null → the return value of the function carries the taint. PhASAR generates "ret": "source" — after x = source(), x is tainted.

  • 0 → the first declared parameter becomes tainted (passed by reference). PhASAR generates "params": {"source": [0]} — after source(a, b), a is tainted.

  • N → the (N+1)-th declared parameter becomes tainted. When paramIndex is non-null, ret: source is NOT generated unless the function also appears as a source with paramIndex = null.

asil

ASIL override for this function, or null to use InterfacePointsDsl.defaultAsil.

usage

Expected data-flow usage / known fact.

Constructors

Link copied to clipboard
constructor(token: String, paramIndex: Int? = null, asil: ASIL? = null, usage: SourceUsage = SourceUsage.USED)

Properties

Link copied to clipboard
val asil: ASIL?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard