fix(security): scrub Hermes secrets from voice command subprocess env - #70342
Closed
zapabob wants to merge 1 commit into
Closed
fix(security): scrub Hermes secrets from voice command subprocess env#70342zapabob wants to merge 1 commit into
zapabob wants to merge 1 commit into
Conversation
Salvage incomplete NousResearch#56332: route command TTS/STT through hermes_subprocess_env while preserving delegated-child lineage, and close the sibling local-whisper subprocess.run path that still inherited the full process environment. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Related to open #56332: this salvage preserves delegated-child lineage and adds the separate local-whisper subprocess path, so it is not a duplicate. |
This was referenced Jul 23, 2026
teknium1
pushed a commit
that referenced
this pull request
Jul 28, 2026
## Summary - Spawn system audio players (`ffplay` / `afplay` / `aplay`) with `hermes_subprocess_env(inherit_credentials=False)`. - Prevent gateway tokens and provider API keys from leaking into OS media helpers. - Add a regression test asserting scrubbed env on `Popen`. ## Salvage / credit Sibling of #70342 / incomplete #56332 (TTS/STT command scrub) on the voice-mode playback path.
teknium1
added a commit
that referenced
this pull request
Jul 28, 2026
Command providers legitimately reference their own API keys in shell templates (curl one-liners). The #70342 scrub removes ALL provider keys, which would break such setups. Add a per-provider env_passthrough list (TTS + STT) that copies named variables back from the parent env, plus docs and tests. Scrub stays the default; passthrough is explicit opt-in.
teknium1
pushed a commit
that referenced
this pull request
Jul 28, 2026
## Summary - Spawn system audio players (`ffplay` / `afplay` / `aplay`) with `hermes_subprocess_env(inherit_credentials=False)`. - Prevent gateway tokens and provider API keys from leaking into OS media helpers. - Add a regression test asserting scrubbed env on `Popen`. ## Salvage / credit Sibling of #70342 / incomplete #56332 (TTS/STT command scrub) on the voice-mode playback path.
teknium1
added a commit
that referenced
this pull request
Jul 28, 2026
Command providers legitimately reference their own API keys in shell templates (curl one-liners). The #70342 scrub removes ALL provider keys, which would break such setups. Add a per-provider env_passthrough list (TTS + STT) that copies named variables back from the parent env, plus docs and tests. Scrub stays the default; passthrough is explicit opt-in.
teknium1
pushed a commit
that referenced
this pull request
Jul 28, 2026
## Summary - Spawn system audio players (`ffplay` / `afplay` / `aplay`) with `hermes_subprocess_env(inherit_credentials=False)`. - Prevent gateway tokens and provider API keys from leaking into OS media helpers. - Add a regression test asserting scrubbed env on `Popen`. ## Salvage / credit Sibling of #70342 / incomplete #56332 (TTS/STT command scrub) on the voice-mode playback path.
teknium1
added a commit
that referenced
this pull request
Jul 28, 2026
Command providers legitimately reference their own API keys in shell templates (curl one-liners). The #70342 scrub removes ALL provider keys, which would break such setups. Add a per-provider env_passthrough list (TTS + STT) that copies named variables back from the parent env, plus docs and tests. Scrub stays the default; passthrough is explicit opt-in.
teknium1
pushed a commit
that referenced
this pull request
Jul 29, 2026
## Summary - Spawn system audio players (`ffplay` / `afplay` / `aplay`) with `hermes_subprocess_env(inherit_credentials=False)`. - Prevent gateway tokens and provider API keys from leaking into OS media helpers. - Add a regression test asserting scrubbed env on `Popen`. ## Salvage / credit Sibling of #70342 / incomplete #56332 (TTS/STT command scrub) on the voice-mode playback path.
teknium1
added a commit
that referenced
this pull request
Jul 29, 2026
Command providers legitimately reference their own API keys in shell templates (curl one-liners). The #70342 scrub removes ALL provider keys, which would break such setups. Add a per-provider env_passthrough list (TTS + STT) that copies named variables back from the parent env, plus docs and tests. Scrub stays the default; passthrough is explicit opt-in.
teknium1
pushed a commit
that referenced
this pull request
Jul 29, 2026
## Summary - Spawn system audio players (`ffplay` / `afplay` / `aplay`) with `hermes_subprocess_env(inherit_credentials=False)`. - Prevent gateway tokens and provider API keys from leaking into OS media helpers. - Add a regression test asserting scrubbed env on `Popen`. ## Salvage / credit Sibling of #70342 / incomplete #56332 (TTS/STT command scrub) on the voice-mode playback path.
teknium1
added a commit
that referenced
this pull request
Jul 29, 2026
Command providers legitimately reference their own API keys in shell templates (curl one-liners). The #70342 scrub removes ALL provider keys, which would break such setups. Add a per-provider env_passthrough list (TTS + STT) that copies named variables back from the parent env, plus docs and tests. Scrub stays the default; passthrough is explicit opt-in.
Contributor
|
Merged into main via consolidated salvage PR #73514 (merge Your contribution is credited to you in git history. Thank you! Closing this PR as merged-via-salvage. |
This was referenced Jul 29, 2026
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
## Summary - Spawn system audio players (`ffplay` / `afplay` / `aplay`) with `hermes_subprocess_env(inherit_credentials=False)`. - Prevent gateway tokens and provider API keys from leaking into OS media helpers. - Add a regression test asserting scrubbed env on `Popen`. ## Salvage / credit Sibling of NousResearch#70342 / incomplete NousResearch#56332 (TTS/STT command scrub) on the voice-mode playback path.
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
Command providers legitimately reference their own API keys in shell templates (curl one-liners). The NousResearch#70342 scrub removes ALL provider keys, which would break such setups. Add a per-provider env_passthrough list (TTS + STT) that copies named variables back from the parent env, plus docs and tests. Scrub stays the default; passthrough is explicit opt-in.
zapabob
added a commit
to zapabob/hermes-agent-windows
that referenced
this pull request
Aug 23, 2026
## Summary - Remove `env.update(os.environ)` after `hermes_subprocess_env(...)` in the TUI compute-host supervisor. - That re-merge re-injected gateway tokens / API keys into the child process and undid scrubbing. - Add a spawn-path regression test asserting messaging tokens stay absent. ## Salvage / credit Sibling of voice/TTS credential scrub (NousResearch#70342 / incomplete NousResearch#56332) on the TUI host spawn surface.
prmartinow
pushed a commit
to prmartinow/hermes-agent
that referenced
this pull request
Aug 26, 2026
## Summary - Spawn system audio players (`ffplay` / `afplay` / `aplay`) with `hermes_subprocess_env(inherit_credentials=False)`. - Prevent gateway tokens and provider API keys from leaking into OS media helpers. - Add a regression test asserting scrubbed env on `Popen`. ## Salvage / credit Sibling of NousResearch#70342 / incomplete NousResearch#56332 (TTS/STT command scrub) on the voice-mode playback path.
prmartinow
pushed a commit
to prmartinow/hermes-agent
that referenced
this pull request
Aug 26, 2026
Command providers legitimately reference their own API keys in shell templates (curl one-liners). The NousResearch#70342 scrub removes ALL provider keys, which would break such setups. Add a per-provider env_passthrough list (TTS + STT) that copies named variables back from the parent env, plus docs and tests. Scrub stays the default; passthrough is explicit opt-in.
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
## Summary - Spawn system audio players (`ffplay` / `afplay` / `aplay`) with `hermes_subprocess_env(inherit_credentials=False)`. - Prevent gateway tokens and provider API keys from leaking into OS media helpers. - Add a regression test asserting scrubbed env on `Popen`. ## Salvage / credit Sibling of NousResearch#70342 / incomplete NousResearch#56332 (TTS/STT command scrub) on the voice-mode playback path.
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
Command providers legitimately reference their own API keys in shell templates (curl one-liners). The NousResearch#70342 scrub removes ALL provider keys, which would break such setups. Add a per-provider env_passthrough list (TTS + STT) that copies named variables back from the parent env, plus docs and tests. Scrub stays the default; passthrough is explicit opt-in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fix(voice): sanitize command provider subprocess envby @necoweb3). That PR correctly routes command TTS/STT throughhermes_subprocess_env, but it has not landed onupstream/main, and main currently only appliesdelegated_child_subprocess_env()(kanban lineage) — which still inherits full Hermes secrets when not in a delegated child.delegated_child_subprocess_env(hermes_subprocess_env(...))._transcribe_local_command'ssubprocess.run(local whisper /HERMES_LOCAL_STT_COMMAND) previously inherited the full process environment.Prior coverage vs remaining gap
subprocess.runenvCapability note
Command TTS/STT providers still run; only Hermes credentials and internal secrets are withheld from the child.
Test plan
pytest tests/tools/test_tts_command_providers.py::TestCommandTtsEnvpytest tests/tools/test_transcription_tools.py::TestTranscribeLocalCommand::test_command_provider_uses_sanitized_child_envpytest tests/tools/test_transcription_tools.py::TestTranscribeLocalCommand::test_local_whisper_subprocess_uses_sanitized_env