Skip to content

Add Psalm taint flows from a payload to what its methods return - #118

Open
danog wants to merge 1 commit into
amphp:2.xfrom
danog:psalm-payload-flows
Open

danog wants to merge 1 commit into
amphp:2.xfrom
danog:psalm-payload-flows

Conversation

@danog

@danog danog commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Adds Psalm taint analysis flows to Payload: read(), buffer() and __toString() return what the payload holds (@psalm-flow ($this) -> return). A payload a taint source returns, such as the body of an amphp/http-client response, then taints what is read from it, while the payloads the code builds from its own data stay untainted.

Docblock only, no change at runtime. The ($this) form is read by Psalm 7; Psalm 6, which this repository runs, ignores it. Psalm ships the same flows in its stub for this library (vimeo/psalm#12482).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant