Skip to content

fix(compose): pass the two fail-closed secrets to the app container - #48

Merged
MikkoNumminen merged 2 commits into
mainfrom
fix/compose-failclosed-secrets
Jul 24, 2026
Merged

fix(compose): pass the two fail-closed secrets to the app container#48
MikkoNumminen merged 2 commits into
mainfrom
fix/compose-failclosed-secrets

Conversation

@MikkoNumminen

Copy link
Copy Markdown
Owner

Sibling of #46, found by auditing the remaining deployment path. The compose stack is the one where both landmines are armed: the image runs NODE_ENV=production (Dockerfile:22) and Mongo is wired (MONGODB_URL points at the compose mongo service). So:

Both now get the same :? fail-fast treatment AUTH_SECRET already had: docker compose up errors immediately with a generate hint instead of degrading silently weeks later.

Second commit (docs): the README quickstart said "That's it. … zero setup" — already inaccurate since AUTH_SECRET became required, now off by three. It shows the one-time openssl line that writes all three into .env (compose reads .env natively) and scopes the highlight bullet's claim honestly.

Verified: compose YAML parses with all 11 app env keys; full suite green through the pre-push hook (2835). Not runnable end-to-end here (no Docker on this machine) — the :? syntax is the same construct the existing AUTH_SECRET line has used all along.

🤖 Generated with Claude Code

MikkoNumminen and others added 2 commits July 24, 2026 08:54
The compose stack is the one deployment path where both landmines are armed:
the image runs NODE_ENV=production and Mongo IS wired. Without
AUDIT_HMAC_SECRET every audit write throws post-response (entries silently
lost); without TOTP_ENCRYPTION_KEY 2FA setup/verify errors at runtime (fail
closed by design since b7131d8 — and before that it was broken here anyway,
since compose passes no NEXTAUTH_SECRET for the legacy fallback either).

Require both with the same `:?` fail-fast treatment AUTH_SECRET already gets:
an immediate, actionable error at `docker compose up` beats a silent audit
gap and a 2FA error weeks later.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
"That's it, zero setup" predates the AUTH_SECRET requirement and now the
audit/2FA keys too. Show the one-time openssl line that writes all three to
.env (compose reads .env natively), and scope the Docker-ready highlight's
"zero setup" claim honestly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hr-manager Ignored Ignored Jul 24, 2026 6:00am

@MikkoNumminen
MikkoNumminen merged commit 97fdfe0 into main Jul 24, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown

Mutation Testing

Score: 71.11% (break threshold 60% — ✅ pass). 320 detected / 450 valid mutants (killed 194, timeout 126, survived 29, no-coverage 101). Full report.

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