diff --git a/docs/api.md b/docs/api.md index 1e852e208..1161246cc 100644 --- a/docs/api.md +++ b/docs/api.md @@ -233,6 +233,7 @@ run( string $command, ?string $cwd = null, ?array $env = null, + #[\SensitiveParameter] ?string $secret = null, ?bool $nothrow = false, ?bool $forceOutput = false, @@ -278,6 +279,7 @@ runLocally( ?string $cwd = null, ?int $timeout = null, ?int $idleTimeout = null, + #[\SensitiveParameter] ?string $secret = null, ?array $env = null, ?bool $forceOutput = false, diff --git a/src/Ssh/RunParams.php b/src/Ssh/RunParams.php index c6df31cac..af58288e7 100644 --- a/src/Ssh/RunParams.php +++ b/src/Ssh/RunParams.php @@ -13,10 +13,12 @@ public function __construct( public ?int $timeout = null, public ?int $idleTimeout = null, public bool $forceOutput = false, + #[\SensitiveParameter] public ?array $secrets = null, ) {} public function with( + #[\SensitiveParameter] ?array $secrets = null, ?int $timeout = null, ): self { diff --git a/src/functions.php b/src/functions.php index 8738ca54b..0fb0c6ce2 100644 --- a/src/functions.php +++ b/src/functions.php @@ -393,6 +393,7 @@ function run( string $command, ?string $cwd = null, ?array $env = null, + #[\SensitiveParameter] ?string $secret = null, ?bool $nothrow = false, ?bool $forceOutput = false, @@ -483,6 +484,7 @@ function runLocally( ?string $cwd = null, ?int $timeout = null, ?int $idleTimeout = null, + #[\SensitiveParameter] ?string $secret = null, ?array $env = null, ?bool $forceOutput = false,