Repository navigation
fix(plugin-security)!: a kernel serving private objects boots only with an enforcing sharing service - #39789
Conversation
…aring service Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
Kernel fixtures whose subject is permission-set grants declare their objects public_read; the mocked kernels stand in for one carrying a sharing service. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
… fixtures follow the floor The floor's private-object test reuses the one OWD mirror plugin-security already carries. Fixtures whose subject is not row sharing declare their objects org-wide readable; plugin-dev's tests alias the sharing plugin to source. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
…ring service Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
📓 Docs Drift CheckThis PR changes 3 package(s): 21 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 9 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 25 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin bb2b8cd6caa13641ef69d6c5b47b785c51e11d60 && git checkout bb2b8cd6caa13641ef69d6c5b47b785c51e11d60
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ef4e8c5b5ab2246475185915aa9d5604d5824f04 80b53b236d4994aa07d832390681c93da227a08b && git checkout -B drift-repro ef4e8c5b5ab2246475185915aa9d5604d5824f04 && git merge --no-ff 80b53b236d4994aa07d832390681c93da227a08b
node scripts/docs-audit/affected-docs.mjs --json ef4e8c5b5ab2246475185915aa9d5604d5824f04
|
|
security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4 Label · 2026-12-05T03:31Z. |
|
security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4 Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: FAIL |
…egistry it cannot read A kernel whose engine exposes no readable registry is not read as serving no private object. Pins: the unreadable-registry refusal, the refusal on a LiteKernel, and the floor's private-object reading against plugin-sharing's. The env-kernel catalog fixture declares its object org-wide readable. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
…ject org-wide readable Its subject is permission-set grants (full vs row-scoped reads), not row sharing, and a kernel serving a private object boots only with a sharing service. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
|
security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4 Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4 维护者速读
席位意见:ACCEPT。完整 L2 一轮与 delta L2(PASS)均在案。另有两个更宽的契约问题已单独交维护者裁定,它们不阻塞本 PR,本 head 也不妨碍其中任何一种裁定。 席位核对ACCEPT · head
|
|
security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4 Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4 Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4 请审 · head
|
Security-fix: seat-dispatched
Clause-②: no (narrowing — refuses a composition that was accepted)
Metadata-protocol: none
Skills-docs: skills/objectstack-platform/SKILL.md (the
queues/assignmentRulesnote now names private objects on a boot withauth) and itsconfig-plugins-opseval (new case 24)维护者速读
What changes
Two rules now hold on every kernel:
privateboots only with an enforcing record-sharing service. It is judged per kernel atkernel:bootstrapped, before any socket opens, andbootstrap()is refused withPrivateObjectsWithoutSharingErrornaming every such object and the fix. There is no switch that turns it off. A kernel whose object registry cannot be read is refused too (SharingFloorRegistryUnreadableError) rather than read as serving no private object. A host kernel that serves no private object of its own is not refused because its environment kernels serve some.SharingServicePluginhas noenforceoption. Its enforcement middleware and sharing-rule hooks are always installed. Share links behave as before.Also in this PR:
--preset minimal: a boot withauththat serves a private object needssharinginrequires. The built-in tasks and notes are private objects, so in practiceminimal+authalways needs it. The skill note, a new eval case andcontent/docs/deployment/cli.mdxsay so.DevPlugincomposesSharingServicePluginbesideSecurityPlugin, so record sharing is now enforced in that stack. Its tests alias the sharing plugin to source.explain()already carries (describeOwd, now exported), so there is no second copy.Governed surface: the diff touches
skills/**. The review tier is whatever the register assigns to that path.Test fixtures: kernels whose subject is not row sharing declare their objects
public_read. Fixtures that compose the platform's objects the wayos servedoes mount the realSharingServicePlugin. Mock kernels that stand in for a served one register an enforcingsharingstand-in.Tests
New pins (red before the rule, green after)
packages/plugins/plugin-security/src/private-object-sharing-floor.test.tsruns a real kernel with a real SQLite driver, the real SecurityPlugin and, where mounted, the real SharingServicePlugin:--preset minimalwithoutsharinginrequiresis refused. Controls: listing it boots, and the default preset boots. The providers are resolved throughresolveServedCapabilities+CAPABILITY_PROVIDERS, the same answersos servereads. This is composition level, not a spawnedos serve.packages/plugins/plugin-sharing/src/sharing-plugin-enforcement-always-on.pin.test.ts:SharingPluginOptionshas noenforcekey, plus a@ts-expect-errorliteral.Patch round (review 7431474739), in the same pin file:
registry; nogetAllObjects; an answer that is not a list. A registry that throws propagates its own error. Control: an empty list boots.effectiveSharingModelover the owner column on 88 schemas (every model, declared top-level or undersecurity, with and without the owner column, custom and platform-named, with and withoutisSystem).Ablation:
Suites run locally (head 4253f1c; the dogfood row on 80b53b2)
public_readTypecheck passed for plugin-security, plugin-sharing, plugin-dev and plugin-auth.
NOT MEASURED locally, so CI decides:
packages/verify: needs the built closure.Acceptance notes
node scripts/ci/snapshot-next.mjs --self-testfails one case on this branch and on the merge base (checked in a detached base worktree). It is pre-existing and not touched here.check:skill-examples(spec),check:dual-build-cjs-loadsandcheck:i18nprinted PREREQUISITE NOT MET locally, so they are NOT MEASURED. CI runs them.Verification
Run one command and expect
Tests 19 passed:Read first:
packages/plugins/plugin-security/src/private-object-sharing-floor.tsholds the rule: which objects count, and what "enforcing" means.packages/plugins/plugin-sharing/src/sharing-plugin.tshas the now-unconditional enforcement block.packages/plugins/plugin-dev/src/dev-plugin.tshas the new composition.🤖 Generated with Claude Code
https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4