Skip to content

fix(plugin-auth)!: a change to a user's credential ends every other outstanding password-reset token of that user - #34667

Merged
objectstack-fleet[bot] merged 13 commits into
mainfrom
claude/sec2-24jr
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 13 commits into
mainfrom
claude/sec2-24jr

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Clause-②: no (narrowing) — a password write through either of this plugin's storage adapters (the factory AuthManager composes, and the exported raw createObjectQLAdapter) ends every other password-reset link and texted reset code still outstanding for that user, in the same request and before the new password is written. In the AuthManager composition that is every door that sets a password: a completed reset (POST /reset-password, POST /phone-number/reset-password), the user's own POST /change-password, an administrator's POST /admin/set-user-password, and a first password (POST /set-initial-password). No request, response or metadata shape is added, removed or re-shaped; a link or code requested after the change resets as usual.
Metadata-protocol: none
Skills-docs: updated here — content/docs/permissions/authentication.mdx states the rule; no skill under skills/** teaches the reset doors.

维护者速读

  • 改了什么:用户的密码只要经本插件的存储适配器被写入(完成重置、本人改密、管理员设密、首次设密,以及导出的原始 createObjectQLAdapter),该用户此前发出、尚未使用的其他重置链接和短信重置码一律作废;改动之后再申请的链接/验证码照常可用。
  • 为什么改:安全加固,规则是「凭据一变,之前的重置凭证全部失效」。
  • 风险与回滚:每次写密码多一次读和一两次按条件删除(配置了二级缓存时先读后按 id 删);作废失败、缓存键无法确定、或部署把验证标识存成非明文时,这次写密码直接报错、旧密码不变(宁可失败,不留活凭证)。回滚 = revert 本 PR。
  • 先看:packages/plugins/plugin-auth/src/credential-change-ends-reset-tokens.ts(规则、两条删除路径与三种拒绝)、packages/plugins/plugin-auth/src/objectql-adapter.ts 中工厂适配器与原始适配器的 create / update / updateMany 接线(均在写入之前)、packages/plugins/plugin-auth/src/credential-change-ends-reset-tokens.test.ts。
  • 两分钟验证:pnpm --filter @objectstack/plugin-auth exec vitest run src/credential-change-ends-reset-tokens.test.ts,预期 17/17 通过。
  • 需要你做的:无,席位落地。

What changes

  • The rule — packages/plugins/plugin-auth/src/credential-change-ends-reset-tokens.ts (new): a change to a user's credential ends every other outstanding password-reset token of that user — the emailed reset links and the texted reset code for the phone number the user holds — and, with a host secondaryStorage in the AuthManager composition, their cached copies. An ended token answers exactly what a token never issued answers. With no cache, each token shape is ended by one predicate delete; with a cache, the links are read first so each cached copy can be named, and exactly those rows are deleted. A password write is refused, and the old password stands, when its tokens cannot be ended, when a cached link's key cannot be named, when the verification store keeps identifiers other than plain (verification.storeIdentifier), or when the account row it targets names no user.
  • The wiring — packages/plugins/plugin-auth/src/objectql-adapter.ts: both storage adapters call the rule for every sys_account write that carries password, before the write lands: the factory AuthManager composes (create, update, updateMany) and the exported raw createObjectQLAdapter (the same three verbs). The raw adapter is handed none of better-auth's options, so through it the rule covers the token rows only; a host that pairs it with a secondaryStorage or a verification.storeIdentifier setting is outside the rule.
  • Docs — content/docs/permissions/authentication.mdx states the rule beside the reset section.
  • Census — the tenant-audit census is regenerated over current main for this change's three engine write sites (node scripts/tenant-audit-census.mjs --write); main's census is now sharded per package, so the only moved artefact is the plugin-auth shard (docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-auth.md): write call sites 95 → 98, object name chosen at run time 37 → 40, other run-time expression 35 → 38, provably carrying no context 12 → 15, readable engine type 69 → 72; repository total 325.
  • Changeset — @objectstack/plugin-auth patch, BREAKING narrowing, ADR-0087 not-required; it scopes the rule to the two storage adapters and states what the raw one does not cover.

The eight plugin-auth files held by #34333 are untouched.

Tests

packages/plugins/plugin-auth/src/credential-change-ends-reset-tokens.test.ts — every door through the real routes (a real AuthManager over a real ObjectQL engine on better-sqlite3, behind AuthPlugin.registerAuthRoutes on a Hono app):

  • a completed reset ends the user's other reset links, whichever was spent first; the ended link answers what a never-issued link answers, at POST /reset-password and at its landing (GET /reset-password/:token); the password is the one the spent link set;
  • POST /change-password, POST /admin/set-user-password (for a user with a local password and for one without) and POST /set-initial-password each end every link outstanding before them; a link requested afterwards resets (the control);
  • a password write through the exported createObjectQLAdapter ends the holder's earlier link;
  • a password change ends the outstanding texted reset code (it answers what a never-sent code answers); a code requested afterwards resets; a completed texted-code reset ends the outstanding links;
  • another user's links are untouched (the control);
  • with a secondaryStorage cache, an ended link's and an ended texted code's cached copies are gone, and the link answers what a never-issued link answers;
  • a password write does not land — the old password stands and the outstanding link resets — when a token delete fails, and when a cached link's key cannot be named;
  • the composed verification store carries no identifier-storage setting (a closed key set, with and without a cache); a password write under a setting other than plain is refused, and so is one whose target names no user.

Acceptance notes

  • None beyond the scope stated in the changeset.

Verification

Head 1e66034e6a. The pins, the ablation, the suite, typecheck and the gates were read at 5f08f64e63; the one commit after it, 1e66034e6a, merges main commits that touch only ui/** and .changeset/**, and the census gate was re-run there.

  • The pins — credential-change-ends-reset-tokens.test.ts: 17/17 passed.
  • Ablation (one shot, at 6aa9ab8204, the rule's entry point in credential-change-ends-reset-tokens.ts made inert through scripts/ablation-replace.mjs): 15 of 17 red, then restored — blob equal to HEAD, git diff HEAD empty. The two that stay green are by design: the cross-user control, and the composed-configuration pin, which reads the auth instance and not the rule.
  • plugin-auth — pnpm --filter @objectstack/plugin-auth test: exit 0, Test Files 283 passed (283), Tests 5923 passed / 10 skipped (5933). pnpm --filter @objectstack/plugin-auth typecheck: exit 0 (including check:test-typecheck, debt ledger unchanged).
  • Census — node scripts/check-tenant-audit-census.mjs: exit 0 at 5f08f64e63 and at 1e66034e6a (325 write call sites certified across 18 package shards); --self-test exit 0.
  • Dogfood battery — not re-run this round: the change since the battery's green reading at f389175cb7 (478 passed / 3 skipped files) is the seam module, its wiring in both adapters, its pins, the changeset and the census.
  • Derived gates — node scripts/pm/dispatch-gates.mjs --commands (100 families), each run with its exit code captured before any pipe, then --ran reconciled: 98 exit 0; 1 NOT MEASURED — pnpm check:dual-build-cjs-loads exit 3 (prerequisite: a full repository build), left to CI; 1 exit 1 — pnpm check:docs-transcript-drift, on three pages this diff does not touch (content/docs/deployment/validating-metadata.mdx, content/docs/getting-started/build-with-claude-code.mdx, content/docs/ui/react-pages.mdx), whose stated author-time rule count is one above what packages/lint/src/authoring-rules.ts derives; this tree is byte-identical to main on those pages and on packages/lint, so the reading is main's own. check:docs, check:skill-examples and check:type-check-debt were re-run after their prerequisite builds: exit 0 each.
Gate readings
  • node scripts/check-tenant-audit-census.mjs: exit 0 — 325 write call sites certified across 18 package shards.
  • pnpm --filter @objectstack/spec run check:docs: exit 0 — 248 generated files in sync.
  • pnpm --filter @objectstack/spec run check:skill-examples: exit 0 — 347 prose examples type-check across 3 surfaces.
  • pnpm check:type-check-debt: exit 0 — 0 raw tsc errors above any recorded number.
  • pnpm check:nul-bytes: exit 0 at 1e66034e6a.
  • node scripts/pm/dispatch-gates.mjs --ran: 100 derived families accounted for — 99 run, 1 NOT MEASURED.

Generated by Claude Code

…okens

WIP: the seam module and its adapter wiring; tests follow.

Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj
Co-authored-by: Claude <noreply@anthropic.com>
…tokens at every door

WIP: door-level pins, changeset and the docs line.

Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj
Co-authored-by: Claude <noreply@anthropic.com>
The tenant-audit census conflict is resolved by regeneration over main's
page: main's population plus this branch's one write site.

Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-auth, touching 20 documentable anchor(s).

21 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json dc66d3308271f3055308c5c982ebc8d53195065f.

⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 21 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json dc66d3308271f3055308c5c982ebc8d53195065f → packageMentionDocs.

Which tree this was computed on

This run read content/docs from e907aeae4071ba8f37f132fa7a1c494354a7cb9f — the merge of head 1e66034e6aac09d97216eedebcc3a3f1490f27e8 into base dc66d3308271f3055308c5c982ebc8d53195065f, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin e907aeae4071ba8f37f132fa7a1c494354a7cb9f && git checkout e907aeae4071ba8f37f132fa7a1c494354a7cb9f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin dc66d3308271f3055308c5c982ebc8d53195065f 1e66034e6aac09d97216eedebcc3a3f1490f27e8 && git checkout -B drift-repro dc66d3308271f3055308c5c982ebc8d53195065f && git merge --no-ff 1e66034e6aac09d97216eedebcc3a3f1490f27e8

node scripts/docs-audit/affected-docs.mjs --json dc66d3308271f3055308c5c982ebc8d53195065f

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs dc66d3308271f3055308c5c982ebc8d53195065f → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · os-justin · session_01QSeKYn5CmmdShCJifm6WYj

The seat adopts the record below, rendered on this head by an isolated reviewer at the contract-review tier. The seat orders S1–S4 before landing.

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3692701c5c874b62c1fb2467616ac38771aed1f4
Local-runs: none
Scope: packages/plugins/plugin-auth/src/credential-change-ends-reset-tokens.ts, packages/plugins/plugin-auth/src/objectql-adapter.ts, packages/plugins/plugin-auth/src/credential-change-ends-reset-tokens.test.ts, content/docs/permissions/tenant-audit-census.mdx, docs/audits/2026-08-tenant-audit-write-call-sites.counts.md, .changeset/credential-change-ends-reset-tokens.md, content/docs/permissions/authentication.mdx + packages/plugins/plugin-auth/src/auth-manager-auth-instance.ts, packages/plugins/plugin-auth/src/auth-schema-config.ts, packages/plugins/plugin-auth/src/auth-manager-plugin-list.ts, packages/plugins/plugin-auth/src/internal-field-readback.ts, packages/plugins/plugin-auth/src/admin-user-endpoints.ts, packages/plugins/plugin-auth/src/admin-import-users.ts, packages/plugins/plugin-auth/src/set-initial-password.ts, packages/platform-objects/src/identity/sys-verification.object.ts, packages/platform-objects/src/identity/sys-account.object.ts, packages/platform-objects/src/identity/sys-user.object.ts

① Derived judgments

Read: the diff origin/main...3692701c, the PR body, the head's check-runs, the cited code at the head, and the vendor's published 1.7.12 source (read only; nothing built or run).

  • Door coverage holds. Every password write in the vendor at 1.7.12 (both reset doors, the user's own change, set-password, sign-up, the administrator's doors) goes through the storage seam this PR wires, on its create, single-update and bulk-update verbs. The repo's own doors (administrator set-password, create-user, import, set-initial-password) call the same vendor layer. I found no direct engine write of a password outside that seam: the other engine writes on the account object touch only the history column, and the generic data API serves the account object read-only.
  • A reset door does not end the token it is spending. The vendor consumes the spent token before the password write, so the rule's deletion cannot fail the reset in progress.
  • No cross-user over-reach found. Link matching is bound to the user's id and the reset-link form; the texted code is bound to the number that user holds, which is the same exact-match key the reset door finds its user by. The control test pins the link half.
  • No same-user over-reach on non-password account writes. A social or SSO account create or token refresh carries no password key, so the rule stays inert there.
  • Fail-closed holds on the main path. A read or delete error aborts before the password write, and one test pins it.
  • Token forms. Emailed link, texted code and the cached copies of both are matched. The email-code reset plugin is not mounted and no custom code verifier is configured, so no reset token lives outside the verification store.
  • Census. One new write site, and every moved figure is consistent with it (323, 96, 13, 72, 256, 86). The ledger stamp 5a448780c is an ancestor of the head, with one later merge from main. The dev reports the census gate green after that merge; I could not confirm it from CI because Build Core, Test Core, Check Changeset, Build Docs and the PR-body guards were still in progress on this head when read.
  • authentication.mdx agrees with the code: four doors, the same answer as a never-issued token, and later tokens work.

② Semver level

patch on @objectstack/plugin-auth with Metadata-protocol: none is the correct level: this is a non-protocol break, and it keeps its banner and disposition.

  • Declaration lines. The Clause-②: no (narrowing) line is present, line-initial and identical in the PR body and the changeset. The title carries !.
  • ADR-0087 marker. Exactly one marker, not-required (no-migration-prescription). The category is open here because the kind is none, not narrowed. Its justification is true: no schema key, export or stored shape moves.
  • BREAKING banner and "Who moves". Both are present and match the shape of the stock narrowing changesets on main. "Who moves" correctly names the only affected party, the holder of a link or code issued before the change. The "Now" bullet also discloses the new refusal, that a password write whose tokens cannot be ended does not land.
  • The narrowing itself. It takes away a behaviour a consumer could rely on (an older reset token surviving a password change). It adds no shape. It is declared correctly as a narrowing, not a widening.

③ Boundary flags

  • Residual 1, the legacy raw adapter export is not wired: follow-up, not a blocker. No composition in the tree uses it, AuthManager composes only the factory, and the export already carries none of the factory's other seams. The published wording is finding S1.
  • Residual 2, matching depends on identifiers stored as the vendor writes them: follow-up, not a blocker. The auth instance builds its verification config from a constant and passes no host setting through, so the breaking setting is not reachable today. It is unpinned, which is finding S2.
  • Residual 3, sequential writes with no native transaction, rule first: accepted. The order (end tokens, then write) is the right one, and a failure keeps the old password. Its remaining window is in finding S4.
  • SQL push-down (Prime Directive 5): finding S4. The rule reads ids and deletes row by row where one predicate delete could push down, and the file gives no reason.
  • Open question for the security seat. The title says "credential" while the enforced rule and the docs say "password". Non-password events (an email change, removal of the local credential) do not end outstanding tokens. The order's list names password doors only, so this is outside the claim. I raise it as a scope question, not a finding.

④ Design judgment

The narrowing against main: it removes a behaviour at the consumer and makes no spec refusal weaker. The code agrees with the rule as published for the composition the platform ships. No must-fix.

should-fix

  • S1. Published text is wider than what is enforced. The changeset says "by any door" and the Clause-② line says "every door that sets a user's password". The exported, README-documented legacy adapter is outside the rule, and only the PR body's acceptance notes say so. The changeset ships as the package CHANGELOG. Either scope the sentence to the AuthManager composition or wire the export.
  • S2. Residual 2 has no pin. If the identifier-storage setting is ever introduced, the rule matches nothing and says nothing, which is a silent fail-open. Add a pin that fails when that setting appears. [detail held by the security seat]
  • S3. One silent skip on the cache arm. With a host cache configured, a link whose cache key cannot be derived is passed over without error, where the rest of the rule aborts. It is not reachable in the shipped composition, and the cache test pins the working path. Make it abort, to match the stated posture. [detail held by the security seat]
  • S4. Read-then-delete by id. No reason is stated for not pushing the delete down. It also leaves a short window in which a token issued mid-request survives the change. A predicate delete where no cache is configured narrows that window; otherwise state the reason in the file. [detail held by the security seat]

nit

  • N1. A credential write whose target names no user is skipped silently. This is not reachable through the vendor's writers.
  • N2. Pins are missing for the cached copy of a texted code, and for the administrator's door on a user with no local password. The same storage verb is pinned through set-initial-password.
  • N3. The PR's Verification section reads the suite and gates one commit behind the head, with only the pins re-run at the head. That is acceptable for a commit touching one test name and two comments, but CI on this head had not finished when read.

Implemented-by: claude/sec2-24jr
Reviewed-by: session_01QSeKYn5CmmdShCJifm6WYj

VERDICT: PASS

…s and refuses where it cannot find or name them

WIP: predicate deletes where no cache is configured; pins for the composed
identifier setting, the cache arm's refusal, the cached texted code, the
administrator's door on a user with no local password and the raw adapter.

Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj
Co-authored-by: Claude <noreply@anthropic.com>
The tenant-audit census conflict is resolved by regeneration over main's
sharded census: main's population plus this branch's three write sites,
all in the plugin-auth shard.

Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · os-justin · session_01QSeKYn5CmmdShCJifm6WYj

The seat adopts the delta record below, rendered on this head by the same isolated reviewer at the contract-review tier. D1 is accepted as a declared deviation: that refusal is unreachable through the shipped composition, and the PR body states it.

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 1e66034e6aac09d97216eedebcc3a3f1490f27e8
Local-runs: none
Scope: packages/plugins/plugin-auth/src/credential-change-ends-reset-tokens.ts, packages/plugins/plugin-auth/src/objectql-adapter.ts, packages/plugins/plugin-auth/src/credential-change-ends-reset-tokens.test.ts, docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-auth.md, .changeset/credential-change-ends-reset-tokens.md, content/docs/permissions/authentication.mdx + packages/plugins/plugin-auth/src/auth-manager-auth-instance.ts, packages/plugins/plugin-auth/src/auth-schema-config.ts, packages/plugins/plugin-auth/src/internal-field-readback.ts, packages/platform-objects/src/identity/sys-account.object.ts

Delta record on my PASS at 3692701c5c (comment 6939390372). Read: git diff 3692701c5c..1e66034e6a limited to this PR's six files, those files whole at the new head, the replaced PR body, and the head's check-runs. The three merges of main are not judged.

① Derived judgments

Findings of the prior record:

  • S1: closed. The exported raw adapter now applies the rule on its create, single-update and bulk-update verbs, before the write, and a test pins it. The Clause-② line (identical in PR body and changeset) and the changeset are scoped to "either of this plugin's storage adapters", with "every door" claimed only for the AuthManager composition.
  • S2: closed. A credential write is refused when the identifier-storage setting is anything other than absent or plain. A closed-key-set pin on the composed verification config fails when a key is added, with and without a cache. Three non-plain spellings are pinned as refused.
  • S3: closed. On the cache arm, a link whose cache key cannot be named aborts the write, and so does a cache that offers no delete. One test pins that the old password stands and the outstanding link still resets.
  • S4: closed, with an accepted deviation. With no cache, each token form is ended by one pushed-down predicate delete, which also narrows the mid-request window. The cache arm keeps read-then-delete-by-id, and the file states the reason (each ended row must lose its named cache entry with it). I accept that reason. [detail held by the security seat]
  • N1: closed. A targeted account row that names no user is now refused, not skipped, and pinned.
  • N2: closed. Both missing pins exist: the cached copy of a texted code, and the administrator's door on a user with no local password.

What I re-derived on this head:

  • The predicate delete answers a zero-match case without error. The "requested afterwards resets" controls and sign-up exercise it.
  • No cross-user reach is introduced. The predicates carry the same user binding as before.
  • Census. main now shards the ledger per package. The only moved artefact is the plugin-auth shard, with one new row of count 3 for the rule's three delete sites. The shard's figures move consistently with that row (98, 40, 38, 15, 72). The dev reports the census gate exit 0 at this head; I did not confirm it from CI.
  • Check-runs on this head. Nothing has failed. Completed and green include Check Changeset (one of two runs), PR-body guards, Governed Surface Queue Guard, Lint · docs & code guards, Lint · PM dispatch-gates, Type Check · source gates, Type Check · debt ledger and Dogfood Regression Gate. Still in progress when read: Build Core, Build Docs, Test Core 1–8, Type Check · workspace and · consumer gates, three Lint jobs, Live E2E UI and the second Check Changeset run. This verdict is on the diff and does not stand in for those runs.

② Semver level

Unchanged and still correct: patch on @objectstack/plugin-auth, Metadata-protocol: none, title !, one ADR-0087 marker not-required (no-migration-prescription). The marker's justification now also names "which password writes are refused", which is true. The BREAKING banner and "Who moves" are intact. The new raw-adapter bullet states what that adapter does not cover and points to the factory.

③ Boundary flags

  • Residual 1 (raw adapter): answered. It is wired for the token rows. The remainder (a host pairing the raw adapter with a cache or a non-plain identifier setting) is declared in the changeset as outside the rule. That adapter is handed no options, so it can neither see nor refuse those settings. Accepted as a declared deviation.

  • Residual 2 (identifier storage): answered by the refusal and the pin (S2).

  • Residual 3 (no native transaction): unchanged, accepted.

  • SQL push-down: satisfied on the no-cache arm; reason given on the cache arm (S4).

  • New refusals this round. A credential write can now fail where it succeeded at 3692701c5c in four cases:

    1. a non-plain identifier-storage setting: declared in the changeset;
    2. a cached link whose key cannot be named: declared;
    3. a cache with no delete: covered by the same sentence;
    4. a target row naming no user: stated in the PR body, not in the changeset (finding D1).

    None is reachable in the AuthManager composition as shipped: the setting is never set, the readback is present, and the account's user column is required.

  • The non-password scope question is outside this PR's claim and is not graded, as instructed.

④ Design judgment

The code agrees with the narrowed, re-scoped claim. No must-fix.

should-fix

  • D1. The changeset omits one refusal the PR body states. A password write whose target account row names no user is refused. The changeset's "Now" bullet lists the other refusals but not this one, and the changeset is what ships as the CHANGELOG. Add the clause. Not a blocker: the column is required, so the refusal is not reachable through the shipped composition.

nit

  • D2. The refusal messages name internal storage and a recovery path. Confirm they stay in the server log and that the door answers a generic error to the caller. [detail held by the security seat]
  • D3. The public text stays at rule level. It names two configuration keys and one declared limit of the legacy adapter, which is needed for the claim to be accurate, and it discloses no matching mechanism.

Implemented-by: claude/sec2-24jr
Reviewed-by: session_01QSeKYn5CmmdShCJifm6WYj

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · os-justin · session_01QSeKYn5CmmdShCJifm6WYj

席位核对

ACCEPT · head 1e66034e6aac09d97216eedebcc3a3f1490f27e8 · 2026-11-17T09:29Z

  • Shape: 6 files. Not governed (check-governed-merges --pr 34667: 0 of 6 paths). Clause-②: no (narrowing), Metadata-protocol: none. Patch for @objectstack/plugin-auth, with the BREAKING banner and one ADR-0087 marker.
  • Contract review: CONTRACT_REVIEW_TIER. PASS on 3692701c5c (6939390372), with S1–S4 ordered; delta PASS on this head (6943646353), with S1–S4, N1 and N2 closed. D1 is accepted as a declared deviation.
  • Rule held: a password write through either of the plugin's storage adapters ends that user's other outstanding reset links and texted reset codes, in the same request and before the new password is written. An ended token answers what a never-issued token answers. A write whose tokens cannot be ended does not land.
  • Tests (dev):
    • door pins 17/17;
    • plugin-auth 5923 passed;
    • ablation red (15 of 17), then restored;
    • full dogfood battery 4054 passed, on the round-one head.
  • Held by the seat: the scope question (non-password credential events). It is outside this PR's claim.
  • Check-runs at this head: 40 success, 17 skipped, 0 failed. K = 2.
  • Landing: ready, then the merge queue. The advisory closes on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 17, 2026 09:31
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 6dd5716 Nov 17, 2026
58 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/sec2-24jr branch November 17, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant