mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-09 13:21:42 +00:00
_CuaDriverSession._call_tool_via_cli() (the EAGAIN/silent-empty MCP fallback transport) invokes `cua-driver call <tool> <json>` via subprocess.run() with no env= argument, so the third-party cua-driver binary inherits the full, unsanitized parent environment. The primary MCP spawn site (_lifecycle_coro) already applies _sanitize_subprocess_env(cua_driver_child_env()) before opening the stdio client, per the same policy #53503/#55709 established for other subprocess spawn points — this fallback path, added alongside the EAGAIN/silent-empty-capture hardening, missed it. Fix: apply the same env=_sanitize_subprocess_env(cua_driver_child_env()) to the subprocess.run() call in _call_tool_via_cli(), mirroring the sanctioned spawn site exactly (telemetry policy applied first, then Hermes-managed secrets filtered). |
||
|---|---|---|
| .. | ||
| test_cua_cli_fallback_env.py | ||
| test_cua_telemetry.py | ||
| test_doctor.py | ||