fix(platforms): strip secrets from bridge subprocess env - #56245
Open
necoweb3 wants to merge 1 commit into
Open
Conversation
Contributor
|
Thanks for addressing the verified Raft and WhatsApp bridge leaks. The two proposed bridge substitutions correctly use the existing sanitizer in Problems
Suggested changes
Automated hermes-sweeper review. |
This was referenced Aug 11, 2026
Contributor
|
Bound to the child-process credential-inheritance class under #83565 (#83565) — same bug class, different surface. platform bridge subprocess env strip; Wave E — sibling to #38080 on plugins/platforms/whatsapp/adapter.py; adjudicate the pair before merging. The EPIC carries the live class table, dedup adjudication, and the dependency-driven merge order. |
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
Strip Hermes secrets from platform bridge subprocess environments.
Raft and WhatsApp both spawn local bridge subprocesses from the gateway process. Those subprocesses previously inherited the full gateway
os.environ:plugins/platforms/raft/adapter.pyused{**os.environ, "RAFT_CHANNEL_TOKEN": ...}.plugins/platforms/whatsapp/adapter.pycalledwith_hermes_node_path()with no base env, which copiesos.environ.That leaks unrelated Hermes credentials and gateway-internal secrets into platform bridge child processes, including provider API keys,
AUXILIARY_*side-LLM credentials, andGATEWAY_RELAY_*material.Changes
hermes_subprocess_env(inherit_credentials=False).RAFT_PROFILEandRAFT_CHANNEL_TOKEN.WHATSAPP_MODE, cache directory paths, and optional reply prefix.Why
Platform bridges do not need LLM provider credentials or gateway relay credentials. They only need their own narrow bridge configuration. This mirrors the subprocess secret-stripping policy now used by the terminal/codex/docker child-process paths.
Tests