Files
hermes-agent/agent
Teknium 2e9e172926 fix: managed worker env is scrubbed by owning profile; outbox ids stay inside worker-outboxes
_worker_env decided whether to scrub the launch environ from the process-wide
multiplex flag. A worker spawned for another profile while that flag read False
(a transient toggle, or a swallowed set_multiplex_active failure) inherited the
launch process env byte-for-byte: NOUS_API_KEY, launch .env names and
vault-sourced values. Probe (fake HOME, flag off): before the fix env=None, so the
whole launch environ was inherited; after it, no LAUNCH-* values reach the worker.
The scrub now keys on _is_routed_home(owner), as served_profile_child_env already
does, and a routed owner also gets the _scrub_credentials belt for credentials no
.env or source snapshot recorded. The launch profile's own worker in a
single-profile gateway still inherits byte-for-byte.

outbox_dir turned execution_id into a path with no validation. A legacy-imported
admission id is arbitrary text, so ../ (POSIX) or ..\ / drive spellings (Windows)
could name a directory outside worker-outboxes. Names are now limited to
[A-Za-z0-9_-]{1,200}; real ids are 'admission-worker:<uuid hex>'.

(cherry picked from commit 693691f2a6498a6e733d781777dbde0f4c854267)
2026-10-06 16:21:15 -07:00
..
…