Skip to content

docs: state the security behavior the code has today - #637

Merged
Bccorb merged 1 commit into
mainfrom
docs/security-claims-602
Dec 4, 2026
Merged

Bccorb merged 1 commit into
mainfrom
docs/security-claims-602

Conversation

@Bccorb

@Bccorb Bccorb commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Every security claim listed in #602 now matches the code on main. Each item was read against the current code. Where the linked fix has landed, the claim was verified. Where it has not (review bundles #600 and #601 are still open), the doc now states what the code does today and links the tracking issue.

#602 item Outcome
security-posture.md: a rotated token presented twice ends the chain Fix landed in #613, claim verified. findRefreshSessionByToken finds the row by fingerprint alone, with no idle window filter, and the doc's "Reuse detection does not expire" section describes that. No change.
account-recovery.md: "starting is not enough to disturb anything" Doc changed. Bundle 1 (L-API-4) has not landed: startRecovery writes the new code onto the open pending request. The doc now says starting never changes a request's state, clock or notices, but every start on the channel replaces the resume code, so a start by someone else makes the owner's code fail (without spending the failure budget) and the owner starts again.
security-posture.md: one attempt cannot spend or void another attempt's codes Doc changed. Bundle 1 (L-API-5) has not landed: generateEmailOTP and generatePhoneOTP store one code per account and channel on the user row. The posture line and a new "Codes" bullet say each send from any attempt replaces the pending code, and the limits bound how often. Magic links are per attempt in the code, so that part of the claim stays.
security-posture.md: every ephemeral continuation endpoint is behind the flow limiters Doc changed. Bundle 1 (L-API-7) has not landed. The doc now names POST /webauthn/login/start, POST /webauthn/login/finish and GET /magic-link/check as having only the global per-IP limiter, and states the challenge rows and lockout-counting login_failed that login/start writes.
security-posture.md, "Refusals at the auth gate": 404, CORS and /refresh refusals write rows Fix landed in #617, claim verified. app.ts and authentication.ts call countUnauthenticatedRefusal for these, and the doc's "Other free refusals" section describes it. No change.
security-posture.md, "Audit trail integrity": DELETE only for retention, head_mismatch, REVOKE scope Fix landed in #615, claim verified. The protect-auth-event-chain-head migration refuses INSERT, DELETE, TRUNCATE and out-of-band head moves, the doc says the retention setting is not an access control, and the REVOKE block covers auth_event_chain_head. No change.
configuration.md, ADR 0005 E8: issuer host never reachable, private-host lists separate Doc changed. Bundle 2 (L-API-9, L-API-10) has not landed. Both now say the issuer check compares host names exactly (a trailing dot or another DNS name is not caught), and that callouts and provider requests share Node's keep-alive pool, so a callout can reuse a connection to a host listed only in OAUTH_PROVIDER_PRIVATE_HOSTS.
security-posture.md: DELETE /users/delete is not step-up guarded The false line was already removed in #620. Doc changed to add that account deletion needs a fresh step-up beside the passkey deletion line, matching requireStepUp() on the route and admin-operations.md.
security-posture.md:54 and docker-compose.yml: unset secrets fall back to the service token docker-compose.yml was corrected in #618, verified. Doc changed: security-posture.md no longer says DECOY_SUBJECT_SECRET falls back; it says production refuses to start without it, matching src/config/authSecrets.ts.
SECURITY.md: 0.19.x listed as latest Doc changed. The table now lists 0.24.x as supported and 0.23.x and older as not, matching package.json (0.24.3).

One more claim in the same file was corrected: account-recovery.md said every recovery route sits behind the OTP flow limits. The pre-auth routes do, /recovery/cancel has the per-IP one, and the two access-session routes have only the global limiter. The doc now says so.

Docs only, and none of these files ships in a package, so there is no changeset. npm run lint and npx prettier --check on the touched files pass.

Closes #602

Corrects claims about the decoy subject secret, OTP code slots, recovery resume codes,
ephemeral route limiters, callout host rules, account deletion step-up and the supported
version table.
@Bccorb
Bccorb merged commit 0b284cf into main Dec 4, 2026
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.

docs: correct security claims the code does not uphold (v0.24 review)

1 participant