generated from coulomb/repo-seed
Fix warden access proxy for catalog fetch commands with shell pipes.
resolve_fetch_command used shlex.split, which treated `|` as a literal argument — breaking reuse-surface-hub-write-token (kubectl | base64 -d). Piped commands now run via shell=True with inherited stdio for --fetch.
This commit is contained in:
@@ -107,8 +107,8 @@ def test_proxy_fetch_runs_fully_offline_against_double(tmp_path):
|
||||
fetch_command="bao kv get -field=<FIELD> <path_template>",
|
||||
exec_capable=True,
|
||||
)
|
||||
argv = resolve_fetch_command(entry, field="API_KEY", path="platform/x/y/z")
|
||||
resolved = resolve_fetch_command(entry, field="API_KEY", path="platform/x/y/z")
|
||||
env = dict(os.environ, PATH=doubles_path_prepended(tmp_path))
|
||||
# proxy_fetch inherits stdout; run it in a child so we can capture the stream.
|
||||
result = subprocess.run(argv, capture_output=True, text=True, env=env, check=True)
|
||||
result = subprocess.run(resolved.argv, capture_output=True, text=True, env=env, check=True)
|
||||
assert result.stdout.strip().startswith(SYNTHETIC_PREFIX)
|
||||
|
||||
Reference in New Issue
Block a user