Harden hosted Docker install tree against self-modification - #47490
Merged
benbarclay merged 2 commits intoJun 17, 2026
Merged
Conversation
Collaborator
|
The immutability boundary is currently undocumented — docker.md repeatedly says /opt/data is "the single source of truth for all state" but never says /opt/hermes is now read-only to the agent. Concretely:
|
benbarclay
requested changes
Jun 17, 2026
benbarclay
left a comment
Collaborator
There was a problem hiding this comment.
I'd like to see the docs updated as per the comment, but otherwise I'm happy for this to be shipped
shannonsands
marked this pull request as ready for review
June 17, 2026 06:03
benbarclay
approved these changes
Jun 17, 2026
This was referenced Jun 18, 2026
1 task
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…arch#47490) * Harden hosted Docker install tree * Document hosted Docker immutable install tree
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
…arch#47490) * Harden hosted Docker install tree * Document hosted Docker immutable install tree
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…arch#47490) * Harden hosted Docker install tree * Document hosted Docker immutable install tree
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…arch#47490) * Harden hosted Docker install tree * Document hosted Docker immutable install tree
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…arch#47490) * Harden hosted Docker install tree * Document hosted Docker immutable install tree
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
/opt/hermesroot-owned and non-writable at runtime/opt/dataviaHERMES_WRITE_SAFE_ROOT=/opt/datahermesuserWhy
NS-492 tracks hosted agents being able to self-modify installed Hermes source and brick the gateway, with no easy SSH recovery path. This makes the published container enforce the intended boundary in the filesystem: agent-writable data lives under
/opt/data; installed code and dependencies stay immutable to the runtime user.Validation
docker build -t hermes-ns492-readonly-install:test .HERMES_TEST_IMAGE=hermes-ns492-readonly-install:test python -m pytest tests/docker/test_immutable_install_permissions.py -q(2 passed)HERMES_TEST_IMAGE=hermes-ns492-readonly-install:test python -m pytest tests/docker/test_main_invocation.py tests/docker/test_tui_prebuilt_bundle.py tests/docker/test_docker_exec_privilege_drop.py -q(18 passed)HERMES_TEST_IMAGE=hermes-ns492-readonly-install:test python -m pytest tests/docker/test_dashboard.py -q(8 passed)python -m pytest tests/tools/test_dockerfile_immutable_install.py tests/tools/test_dockerfile_node_modules_perms.py tests/tools/test_stage2_hook_immutable_install.py tests/tools/test_lazy_deps.py::TestSecurityGating -q(11 passed)python -m pytest tests/tools/test_file_write_safety.py tests/tools/test_write_deny.py -q(49 passed)python -m pytest tests/tools/test_stage2_hook_toplevel_chown.py tests/tools/test_stage2_hook_user_flag_guard.py tests/tools/test_stage2_hook_log_dir_seed.py tests/tools/test_stage2_hook_gateway_bootstrap_state.py tests/tools/test_dockerfile_immutable_install.py tests/tools/test_dockerfile_node_modules_perms.py tests/tools/test_stage2_hook_immutable_install.py -q(25 passed)git diff --checkLinear: https://linear.app/nousresearch/issue/NS-492/agent-self-modification-can-break-the-installation