From 69e209accc4a741015142524d2fcd2d10fda203d Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 22 Oct 2026 16:12:43 +0200 Subject: [PATCH] Mark request URIs and form file paths as Psalm taint sinks Claude-Session: https://claude.ai/code/session_016B9dWRw6Lako9sXAWMtWAx --- src/Form.php | 2 ++ src/Request.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/Form.php b/src/Form.php index df7cfc04..9d73a113 100644 --- a/src/Form.php +++ b/src/Form.php @@ -95,6 +95,8 @@ public function addStream(string $name, HttpContent $content, ?string $filename /** * @param string $path Local file path. Filename will be provided to the server. * @throws HttpException + * + * @psalm-taint-sink file $path */ public function addFile(string $name, string $path, ?string $contentType = null): void { diff --git a/src/Request.php b/src/Request.php index ed000470..797ab852 100644 --- a/src/Request.php +++ b/src/Request.php @@ -63,6 +63,8 @@ final class Request extends HttpRequest /** * @param non-empty-string $method + * + * @psalm-taint-sink ssrf $uri */ public function __construct(UriInterface|string $uri, string $method = "GET", HttpContent|string $body = '') { @@ -143,6 +145,8 @@ public function setMethod(string $method): void /** * Specify the request's HTTP URI. + * + * @psalm-taint-sink ssrf $uri */ #[\Override] public function setUri(UriInterface|string $uri): void