Skip to content

fix: security hardening batch — pip env var, gosu SHA256, user churn, README, linter config - #13

Merged
libre-7 merged 1 commit into
mainfrom
hardened/security-batch
Aug 24, 2026
Merged

fix: security hardening batch — pip env var, gosu SHA256, user churn, README, linter config#13
libre-7 merged 1 commit into
mainfrom
hardened/security-batch

Conversation

@libre-7

@libre-7 libre-7 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Changes

Batch of security hardening fixes for simplex-bridge:

Dockerfile

  • Replace --break-system-packages flag with PIP_BREAK_SYSTEM_PACKAGES=1 env var — avoids bypassing PEP 668 protection directly
  • Fix gosu SHA256 verification — use sha256sum -c with a temp checksum file instead of fragile sed path rewriting that would break if upstream changes the checksum file format
  • Add .hadolint.yaml — suppress known false positives (DL3008, DL3059)

entrypoint.sh

  • Avoid unnecessary userdel/groupdel on every restart — only recreate the simplex user when UID/GID actually changed. Reduces filesystem churn and startup time

Housekeeping

  • Remove stale patch-hermes-simplex.sh reference from .dockerignore (file doesn't exist on main)
  • Remove stale compatibility note from README referencing deleted feat/hermes-v0.16.0 branch

Verification

  • All changes are backward-compatible — no env var or interface changes
  • Hadolint passes with suppressed false positives
  • Shell syntax verified

… README, linter config

- Replace --break-system-packages flag with PIP_BREAK_SYSTEM_PACKAGES=1 env var
- Fix gosu SHA256 verification: use sha256sum -c with temp checksum file
  instead of fragile sed path rewriting
- Avoid unnecessary userdel/groupdel on every restart — only recreate
  simplex user when UID/GID actually changed
- Remove stale patch-hermes-simplex.sh reference from .dockerignore
- Remove stale compatibility note referencing deleted feat/hermes-v0.16.0 branch
- Add .hadolint.yaml with suppressed false positives
@libre-7
libre-7 force-pushed the hardened/security-batch branch from ae5f1de to 3dfee15 Compare August 24, 2026 06:56
@libre-7

libre-7 commented Aug 24, 2026

Copy link
Copy Markdown
Owner Author

Rebased onto post-#17 main. Scope reduced to this PR's unique contributions:

  • conditional simplex user/group recreation (skip userdel/groupdel churn when UID/GID already match)
  • .hadolint.yaml ignores (DL3008/DL3059)
  • gosu SHA256 verification robustness (explicit checksum file + separate sha256sum -c so the sed pipe can't mask failures)

Dropped as superseded by #17: pip --no-cache-dir/--break-system-packages, sudo removal, README compat-line removal (line was since updated on main), websockets pin.

Websockets pin resolution: PyPI latest stable at execution time is 17.0.1 — identical to what #17 already pinned, so the single pin everywhere is websockets==17.0.1. No version change needed.

@libre-7
libre-7 merged commit 273a119 into main Aug 24, 2026
2 checks passed
@libre-7
libre-7 deleted the hardened/security-batch branch August 24, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant