security: harden production Docker image#1921
Closed
Michaelyklam wants to merge 1 commit into
Closed
Conversation
Collaborator
|
Shipped in v0.51.29 via the Release F batch (release PR #1934, merge SHA 🚀 Release notes: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.29 Thanks for the contribution! |
pull Bot
pushed a commit
to soitun/hermes-webui
that referenced
this pull request
May 8, 2026
…persistence + scroll/lineage fixes + i18n cleanup) Six-PR contributor batch: - PR nesquena#1919 (franksong2702): Persist login rate limit attempts (closes nesquena#1910) - PR nesquena#1920 (franksong2702): Remove dead Kanban start i18n key - PR nesquena#1921 (Michaelyklam): Production Docker image hardening (closes nesquena#1908) - PR nesquena#1926 (ai-ag2026): Prevent chat scroll resets after final render - PR nesquena#1927 (ai-ag2026): Preserve viewport when loading older messages - PR nesquena#1930 (ai-ag2026): Collapse stale compression sidebar segments Tests: 4947 → 4960 (+13 net new). Browser API harness all-green. Opus advisor: SHIP-READY. CHANGELOG conflict on nesquena#1919 auto-resolved during stage rebase (CHANGELOG took ours strategy).
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.
Thinking Path
hermeswebuibefore starting the server.What Changed
sudo,%sudo ALL=(ALL) NOPASSWD:ALL, and thehermeswebuitoosudo-capable staging user fromDockerfile.docker_init.bashso privileged setup runs directly in an explicit root init block, prepares/app,/workspace,/uv_cache, then re-execs ashermeswebuiwithout sudo./tmp/hermeswebui_inithandling withumask 0077,0700scratch directory permissions, and0600scratch files.docs/docker.mdproduction image security model notes.Why It Matters
Verification
python -m pytest tests/test_issue1908_docker_hardening.py tests/test_issue357.py tests/test_issue569_579.py tests/test_v050260_docker_invariants.py tests/test_issue926_hindsight_docker_dependency.py -q→ 45 passedbash -n docker_init.bashgit diff --checkenv -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/ -q→ 4887 passed, 4 skipped, 3 xpassed, 1 warning, 8 subtests passeddocker run --rm python:3.12-slim sh -c 'command -v su && command -v groupmod && command -v usermod && command -v chown'→ confirmed the base image provides the non-sudo primitives used by initRisks / Follow-ups
docker_init.bashas root for UID/GID and bind-mount ownership preparation, then starts the WebUI server ashermeswebui. This keeps existing Docker permission behavior while removing runtime sudo escalation.docker buildcould not complete on this host because the installed Docker lacks the buildx/BuildKit component required by the existingCOPY --chmodDockerfile instruction.Closes #1908
Model Used
OpenAI Codex
gpt-5.5via Hermes CLI, with terminal/file tools for implementation and verification.