Repository navigation
fix(security): hardening round two after the post-outage audit - #13
Merged
Merged
Conversation
- remove /health/whoami (a public test bench for forged IP headers) - clientIp: header configured but absent -> TCP peer, never X-Forwarded-For - rate-limit keys per IPv6 /64; IPv4-mapped folds to IPv4 - Argon2id behind a bounded gate (2 active, 20 waiting, then 503 + Retry-After); gate sits outside verifyPassword's try so "busy" is never counted as a wrong password - refuse DEMO_MODE with a live Stripe key; require https FRONTEND_URL in production and strip trailing slashes - set-password token in the URL fragment, wiped from the address bar; redacted from the console mail transport in production - error handler forwards 4xx messages from Fastify (FST_*) only; library 4xx such as Stripe's become a 500 and reach Sentry - ADR 55
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Why
The audit after the 2026-09-23 outage found no critical issues and a set of medium/low ones. None was being exploited; each was cheap to close. Full table in ADR 55.
What
/health/whoami— a public test bench for forged IP headersclientIp: trusted header configured but absent → TCP peer, neverX-Forwarded-For/64(IPv4-mapped folds to IPv4); audit rows keep the full address503+Retry-After. The gate sits outsideverifyPassword'stry, so "busy" is never counted as a wrong passwordDEMO_MODEwith a live Stripe key; require an httpsFRONTEND_URLin production, trailing slashes strippedFST_*) only; library 4xx (Stripe) become a 500 and reach SentryTests
Backend 480 pass (new:
concurrency,env-rulesvia child processes,mailer-redaction, IPv6 keys, error-handler cases). Frontend 21 unit (newSetPasswordPage.test.tsx), 2 Playwright e2e.Production config check
Current Render settings pass the new boot rules:
FRONTEND_URLis https, Stripe is a test key,DATABASE_URLcarries nosslmode.