Skip to content

security: cache HERMES_YOLO_MODE at import time to prevent subprocess bypass#7994

Open
SHL0MS wants to merge 1 commit into
NousResearch:mainfrom
SHL0MS:fix/security-yolo-bypass
Open

security: cache HERMES_YOLO_MODE at import time to prevent subprocess bypass#7994
SHL0MS wants to merge 1 commit into
NousResearch:mainfrom
SHL0MS:fix/security-yolo-bypass

Conversation

@SHL0MS

@SHL0MS SHL0MS commented Apr 11, 2026

Copy link
Copy Markdown
Collaborator

HERMES_YOLO_MODE was read via os.getenv() on every approval check. A persistent shell session could export HERMES_YOLO_MODE=1 and bypass approval for all subsequent commands. Now cached as _YOLO_AT_STARTUP at module import time. 9 lines across tools/approval.py and 3 test updates. Ref #4170. Split from #4168.

… bypass

HERMES_YOLO_MODE was read via os.getenv() on every approval check.
A persistent shell session could export it to bypass approval in
subsequent commands. Now cached as _YOLO_AT_STARTUP at module import.

Updated 3 tests to monkeypatch the cached constant.

Ref NousResearch#4170. Split from NousResearch#4168.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant