P2 audit remediation: supply chain + deployment hardening - #25
Merged
tyler-rich merged 1 commit intoJul 6, 2026
Conversation
…ent hardening Addresses the P2 tier of docs/reviews/full-audit-2026-07-05.md §10: - SCN-3: parse the documented comma-separated env form for cors_origins and filesystem_scan_roots (NoDecode + a before-validator), so the filesystem-scan enable switch (SCRYE_FILESYSTEM_SCAN_ROOTS=/path) no longer fails at startup. Adds env-parsing tests. - INF-1: add .github/dependabot.yml (github-actions ecosystem, weekly, grouped). SHA-pinning each `uses:` needs current action SHAs, which this environment's egress policy blocks from resolving/verifying — flagged for follow-up rather than pinning to an unverified SHA (would risk red CI). - INF-3: align CLAUDE.md §6's :dev wording with the implemented merged-PR-into-dev trigger (doc alignment; no behavior change). - INF-2: document the fork-PR :dev publish limitation in publish.yml as an accepted trade-off; the push-based alternative is a §6 locked-decision change left for a deliberate call. - INF-4: document the trivy-server root exception (upstream image ships no non-root USER; mitigations noted), per the audit's accepted alternative. - INF-5: add a small tmpfs:[/run] to docker-socket-proxy (HAProxy needs a writable /run under read_only), with a live-verify note. Deviation logged in docs/PLAN.md.
tyler-rich
merged commit Jul 6, 2026
9eaf809
into
claude/audit-fixes-2026-07-05-9bqe6n-p1
4 checks passed
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.
Implements the P2 tier of
docs/reviews/full-audit-2026-07-05.md§10 (supply chain / deployment hardening).Fully fixed + tested
cors_originsandfilesystem_scan_rootsnow parse their documented comma-separated env form. pydantic-settings triesjson.loadson alist[str]env value, soSCRYE_FILESYSTEM_SCAN_ROOTS=/srv/scan— the enable switch for the security-gated filesystem-scan feature — failed at startup. Fixed withNoDecode+ afield_validator(mode="before"). New tests constructSettingsstraight from the env var.tmpfs:[/run]to thedocker-socket-proxysidecar (HAProxy needs a writable/rununderread_only), with a note to live-verify the profile and only addcap_add:[SETUID,SETGID]if it still can't drop privileges.Applied as documentation / conservative change (see notes)
.github/dependabot.yml(github-actions ecosystem, weekly, grouped). The other half of INF-1 — pinning eachuses:to a commit SHA — could not be completed here: this environment's egress policy blocks GitHub outside this repo, so current action SHAs can't be resolved/verified, and pinning to an unverified SHA would risk red CI. Flagged for a follow-up where SHAs can be resolved (Dependabot will then keep them current).CLAUDE.md§6's:devwording with the implemented merged-PR-into-devtrigger (it still said "every push to dev"). Documentation only — no behavior change.trivy-serverroot exception in the compose file (the upstreamaquasec/trivyimage ships no non-rootUSERand hard-codes/root/.cache, so a non-rootuser:would break the DB cache on a root-owned named volume). Per the audit's accepted alternative, with the mitigations spelled out (profile-gated, internal-net-only, read-only FS, no-new-privileges, cap_drop ALL, resource-limited).Needs your decision — INF-2
The
:devpublish silently fails for a fork PR merged intodev(fork PRs get no repo secrets → the Docker Hub login fails). The audit's fix is to switch the trigger toon: push: branches:[dev](base-repo context has secrets). That reverses the deliberate merged-PR trigger you set in the 2026-07-04 deviation (chosen to avoid double-publishing on conflict-resolution pushes) and is a distribution locked-decision (§6) change — so I did not make it unilaterally. I documented the limitation as accepted inpublish.ymlinstead. Tell me if you'd like me to switch to the push-based trigger (I'll revert the INF-3 wording accordingly).Testing
tests/test_config.py: comma-separated env parsing (single + multi + python-list passthrough) for both list settings.ruff+blackclean;.env.examplein sync.Deviation logged in
docs/PLAN.md§ Deviations (2026-07-05 P2 entry).