Skip to content

Tag reference

@psalm-taint-source

The @psalm-taint-source tag marks the return value as a taint source of the given type. It is part of Psalm’s taint-analysis annotations.

Grammar

"@psalm-taint-source" <Name> [ <Description> ]

Examples

A function returning user input.
/**
* @psalm-taint-source input
*/
function getQueryParameter(string $name): string

Names by platform

psalm
@psalm-taint-source

Parsing a @psalm-taint-source tag produces a PsalmTaintSourceTag instance, carrying the parsed $identifier alongside the $name and optional $description every Tag already provides.

final class PsalmTaintSourceTag extends IdentifierTag {}

See Psalm’s security analysis annotations.