From ad32a8d9be67ce3b412ad7ea5e033fa9ee6b6607 Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Thu, 5 Feb 2026 10:05:26 +0100 Subject: [PATCH] Run command for execution policy with -Command --- packages/safe-chain/src/shell-integration/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/safe-chain/src/shell-integration/helpers.js b/packages/safe-chain/src/shell-integration/helpers.js index 044cc07..3c60ac1 100644 --- a/packages/safe-chain/src/shell-integration/helpers.js +++ b/packages/safe-chain/src/shell-integration/helpers.js @@ -258,7 +258,7 @@ export function validatePowerShellExecutionPolicy(shellExecutableName) { try { // Security: Use literal command string, no interpolation - const policy = execSync("Get-ExecutionPolicy", { + const policy = execSync('-Command "Get-ExecutionPolicy"', { encoding: "utf8", shell: shellExecutableName, timeout: 5000, // 5 second timeout