You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security(slm): PlaybookExecutor passes secret extra_vars as CLI args — visible in /proc cmdline to local users #11735
Since execute_playbook auto-merges fetch_deploy_secrets() into extra_vars (#3519 — tts_hf_token, autobot_internal_api_key), secret values are visible in the process argv (ps, /proc/<pid>/cmdline) to ANY local user for the entire playbook run (deploys run for minutes). Log lines are safe (only cmd[:5] is logged) — this is strictly the argv exposure.
Fix direction
Write extra_vars to a 0600 temp JSON file and pass -e @<file> (ansible-native), deleting it in a finally. Alternatively pass secrets via environment + lookup('env', ...), but the @file form needs no playbook changes.
ACs
Secret extra_vars never appear in the ansible-playbook argv
Temp vars file is 0600 and removed after the run (including on failure)
Existing playbooks work unchanged (-e @file supplies identical vars)
Unit test: command builder produces -e @<path> and the file contains the vars
Closed — merged to Dev_new_gui via PR #11744, squash commit a5764de49.
AC evidence (verbatim):
"Secret extra_vars never appear in the ansible-playbook argv" — ✅ _build_ansible_command now emits -e @<file>; regression test asserts NO key=value anywhere in argv.
"Temp vars file is 0600 and removed after the run (including on failure)" — ✅ write_temp_extra_vars uses mkstemp (0600, uid-scoped dir, verified by test); unlinked in the same finally as the per-run temp inventory.
"Existing playbooks work unchanged (-e @file supplies identical vars)" — ✅ ansible-native @file form; no playbook changes; only internal caller updated (grep: no external _build_ansible_command call sites).
"Unit test: command builder produces -e @ and the file contains the vars" — ✅ tests/services/test_extra_vars_file_11735.py — 5 tests (perms, round-trip, uniqueness, @file argv, no-vars case).
Verification: 14 passed (new suite + adjacent test_apply_secrets.py); black/bandit/py_compile clean; CI fully green on merge tip (smoke, code-quality, startup-import-smoke, Unit & Integration, Test Summary).
Activity
fix(slm/security): pass ansible extra_vars via 0600 temp file, not ar…
fix(slm/security): pass ansible extra_vars via 0600 temp file, not ar…
github-actions commentedon Jul 15, 2026
PR #11744 (merged to
Dev_new_gui) references this issue with a close keyword.If this issue is fully resolved, close it manually. If work remains, no action is needed.
mrveiss commentedon Jul 15, 2026
Closed — merged to Dev_new_gui via PR #11744, squash commit
a5764de49.AC evidence (verbatim):
_build_ansible_commandnow emits-e @<file>; regression test asserts NOkey=valueanywhere in argv.write_temp_extra_varsuses mkstemp (0600, uid-scoped dir, verified by test); unlinked in the samefinallyas the per-run temp inventory._build_ansible_commandcall sites).Verification: 14 passed (new suite + adjacent test_apply_secrets.py); black/bandit/py_compile clean; CI fully green on merge tip (smoke, code-quality, startup-import-smoke, Unit & Integration, Test Summary).