Repository navigation
docs: state the security behavior the code has today - #637
Merged
Merged
Conversation
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.
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.
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.security-posture.md: a rotated token presented twice ends the chainfindRefreshSessionByTokenfinds 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"startRecoverywrites 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 codesgenerateEmailOTPandgeneratePhoneOTPstore 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 limitersPOST /webauthn/login/start,POST /webauthn/login/finishandGET /magic-link/checkas having only the global per-IP limiter, and states the challenge rows and lockout-countinglogin_failedthatlogin/startwrites.security-posture.md, "Refusals at the auth gate": 404, CORS and/refreshrefusals write rowsapp.tsandauthentication.tscallcountUnauthenticatedRefusalfor 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 scopeprotect-auth-event-chain-headmigration 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 coversauth_event_chain_head. No change.configuration.md, ADR 0005 E8: issuer host never reachable, private-host lists separateOAUTH_PROVIDER_PRIVATE_HOSTS.security-posture.md:DELETE /users/deleteis not step-up guardedrequireStepUp()on the route andadmin-operations.md.security-posture.md:54anddocker-compose.yml: unset secrets fall back to the service tokendocker-compose.ymlwas corrected in #618, verified. Doc changed:security-posture.mdno longer saysDECOY_SUBJECT_SECRETfalls back; it says production refuses to start without it, matchingsrc/config/authSecrets.ts.SECURITY.md: 0.19.x listed as latestpackage.json(0.24.3).One more claim in the same file was corrected:
account-recovery.mdsaid every recovery route sits behind the OTP flow limits. The pre-auth routes do,/recovery/cancelhas 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 lintandnpx prettier --checkon the touched files pass.Closes #602