From 64ffca8beada43a312a846fdc575dedc24f8c306 Mon Sep 17 00:00:00 2001 From: exelchapo Date: Thu, 18 Jun 2026 21:17:12 +0800 Subject: [PATCH] fix: remove SPARK_APPROVAL_ENFORCE bypass in secret fetching readSparkSecretViaPythonBridge() was explicitly setting SPARK_APPROVAL_ENFORCE=0 when calling the Python CLI to fetch secrets, bypassing the approval enforcement mechanism. This allows secrets to be fetched without going through the approval workflow that other secret access paths require. Fix: remove the override, inherit process.env as-is so the Python CLI respects the configured approval enforcement policy. --- src/profileEnv.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/profileEnv.ts b/src/profileEnv.ts index 88ca098e9..7758b32d8 100644 --- a/src/profileEnv.ts +++ b/src/profileEnv.ts @@ -96,7 +96,7 @@ function readSparkSecretViaPythonBridge(secretId: string): string | null { try { const output = execFileSync(command.python, command.args, { encoding: 'utf-8', - env: { ...process.env, SPARK_APPROVAL_ENFORCE: '0' }, + env: process.env, stdio: ['ignore', 'pipe', 'ignore'] }).trim(); return output || null;