mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-23 16:36:23 +00:00
fix: sanitize subprocess env for DDGS worker
os.environ.copy() passes all Hermes secrets (gateway tokens, API keys, dashboard session tokens) into the DDGS child process. Use _sanitize_subprocess_env() to strip Hermes-managed secrets before spawning the worker.
This commit is contained in:
parent
77ee16b747
commit
646e71a9be
1 changed files with 3 additions and 1 deletions
|
|
@ -156,7 +156,9 @@ def _run_ddgs_search_bounded(query: str, safe_limit: int) -> list[dict[str, Any]
|
|||
if _test_hook:
|
||||
request["test_hook"] = _test_hook
|
||||
|
||||
env = os.environ.copy()
|
||||
from tools.environments.local import _sanitize_subprocess_env
|
||||
|
||||
env = _sanitize_subprocess_env(dict(os.environ))
|
||||
if _test_hook:
|
||||
env["HERMES_DDGS_ALLOW_TEST_HOOKS"] = "1"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue