Skip to content

Commit 94b3463

Browse files
feat(lint)!: judge a lowered hook or action body's capabilities like an authored one (#38755)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi92EfsyzCyjwc8X5TRpmNj6z)_ Fixes #38690 Clause-②: no (narrowing) Metadata-protocol: narrowed Skills-docs: none — no `skills/**` text taught the lowered exemption; the one docs page that did (`content/docs/deployment/validating-metadata.mdx`, the two capability rows) is corrected here ## 维护者速读 - 用户能看到什么变化:挂在字符串 handler / target 旁的钩子和脚本动作函数体(构建产物,或手写的)现在也会被校验权限声明,缺权限时在发布和 os validate 时就报错,而不是上线后每次运行被沙箱拒掉;同时构建能认出 `ctx.log?.info(…)` 这类可选链、空白、注释写法,自动补上权限。 - 为什么做:这是「钩子与动作函数体权限校验」这张卡的第二步;取消当时为构建产物留的豁免,并把构建的推断补到与校验规则逐个写法一致。 - 出错会怎样:手写在字符串 handler / target 旁、漏声明权限的函数体,以及构建后丢了权限的产物,发布会被拒并点名缺的权限;首方示例与连接器应用实测零新增拒绝,可整 PR 撤回。 - 要你做什么:无。 ## What changes `validate-action-body-capabilities` (`@objectstack/lint`) skipped a body it took for one the build lowered: a hook body `os build` / `os verify` lowered from an inline `handler`, and at the runtime publish doors any hook body beside a string `handler` (`isLoweredHandlerBody`); and any action body beside a string `target`, judged for `api.write` alone (`isLoweredTargetBody`). The skip covered a body written by hand beside a string ref as well, since the rule cannot tell the two apart. The reason was that the build's capability inference did not read every gated call the rule reads. Step 1 of this card (PR #38731) and #38653 (PR #38686) closed that gate by gate; this PR closes it spelling by spelling. So this PR: - drops both skips and the three helpers that only served them (`isLoweredHandlerBody`, `isLoweredTargetBody`, `loweredActionBodyPaths`). `validateActionBodyCapabilities` no longer takes the `loweredHookRefs` context, and its registry entry passes the stack alone. Neither function was on the package's barrel. - makes the CLI extractor (`packages/cli/src/utils/extract-hook-body.ts`) infer each gated call in each spelling the rule reads. Its `ctx`-anchored member patterns, and their rebound siblings for a renamed or destructured hook context, were literal `ctx.log.info`: `ctx.log?.info(…)`, `ctx?.crypto.randomUUID()`, `ctx.activity?.append(…)`, `ctx.email?.send(…)`, `ctx . log . info(…)` and `ctx.title?.(field)` lowered without their token, and the rule read each as the gated call. Each step now takes `?.` and whitespace, `title` takes the optional call, and inference also reads a comment-blanked copy of the source (the rule's own walk, strings kept), so a comment between steps no longer hides a call. Every change widens: what inferred a token before still does. A hook handler that calls `ctx.email.send` in any of these spellings now lowers with the grant and is refused at build by the hook parse, as `ctx.email.send(…)` already was. - exports `SANDBOX_CAPABILITY_GATES` and `type SandboxCapabilityGate` from the lint barrel, and moves the step-1 CLI enumeration pin off its hand-kept mirror onto that table. - adds a PARITY pin in the CLI. Every gate, leaf, receiver shape and face, in each spelling the rule reads (plain, `?.` before the member, before the leaf and before the call, whitespace, a block or line comment between steps), is lowered through `extractLoweredBody` and judged by `runAuthoringRules('build', …)` twice: ungranted it must draw the gate's finding (so the rule reads that spelling and the pin is not vacuous), lowered it must draw none. A REBOUND block does the same through a hook handler's renamed and destructured context parameter. The one exclusion is a hook body's `email.send`, pinned instead as a build refusal in every spelling. - corrects the text that described the exemption: the two `os explain` entries, the docs rule table, the rule's docblock and the comment over the `lowerCallables` target-shape pin. - registers the narrowing as ADR-0087 semantic entry `lowered-hook-and-action-bodies-capabilities-judged`, with a BREAKING changeset carrying FROM → TO for both authors (a body lowered by the build or written by hand beside a string ref) and the remedy for each: rebuild, or declare the token. - corrects the pending #37815 changeset and its semantic entry, whose sentences this PR makes false (see Deliberate correction). The limit, stated: the build's reading covers the rule's by the pin's enumeration (census × receivers × spellings × faces), not by proof. Where the two differ outside it, the build reads more (a renamed context root, a spelling inside a string), and the over-inferred grant is one the sandbox never checks, except `email.send` on a hook, which is refused at build as before. Measured cost before the change, on `origin/main` at `f782a12033` (scratch script, not committed): every first-party stack (`examples/app-crm`, `app-multi-package` with its two packages, `app-showcase`, `app-starter`, `app-todo`, `packages/apps/connector-docusign`, `connector-github`, `connector-stripe`) loaded, normalized, lowered and parsed as `judgeAuthorTimeRules` does, then judged by the shipped rule and by the rule with both skips emulated away. 70 hook and action bodies, 1 of them lowered (app-crm's opportunity hook): 0 findings shipped, 0 without the skips, **0 newly refused**. The population holds one lowered body, so it bounds authored bodies; the lowered side is bounded by the PARITY pin. ## Tests - New `packages/lint/src/validate-action-body-capabilities.lowered-38690.test.ts` (26 tests). Per removed skip, a lowered body calling each gate ungranted, spelled directly and through an alias: refused (hook: `os validate` / `build` / `lint` and the hook save door; action: top level, object-inline, `os validate` / `build` / `lint`, the action and object doors). Controls: the same lowered body granted is not refused. A lowered body's write keeps its own id beside the other tokens. - `packages/cli/test/extract-hook-body-local-alias-38690.test.ts` (284 tests): the mirror table is deleted; ENUMERATION reads `SANDBOX_CAPABILITY_GATES` and spells every leaf in every spelling through seven receivers; PARITY and REBOUND as above; a hook handler calling `ctx.email.send` in seven spellings plus a renamed context is refused by `HookSchema` after `lowerCallables`. Red first, each fix: - PARITY harness: the earlier PARITY judged the extracted record without `language: 'js'`, which the rule skips, so it could not go red. With the body record the build writes and the widened spellings, against the old extractor: 51 failed. - Extractor `?.` / whitespace / optional call / rebound: the pins against the extractor at `a68c0a41cc`: 76 failed of 247 (ENUMERATION 27, PARITY 24, REBOUND 25). Hook mail in the new spellings: 4 failed of 8 (they built clean before). - Comment between steps: against the extractor at `2aec12e986`: 210 failed of 284, every one a comment spelling. Ablations at the head (`scripts/ablation-replace.mjs`, restore proven blob == HEAD): `MEMBER_STEP` back to a plain `\.`: 84 failed (ENUMERATION 32, PARITY 28, REBOUND 20, mail 4). `title` without the optional call: 11 failed. Inference over the raw source only: 210 failed. The skips re-inserted in the rule, per removed skip: hook 14 failed / 12 passed, non-write action 12 failed / 14 passed of the lint file. Forced test edits, named: - `packages/lint/src/validate-action-body-capabilities.hook-and-tokens-37815.test.ts`: two describe blocks deleted, `authored hook bodies only: a body lowered from a handler is not judged (#37815 route C)` and `authored action bodies only past the writes: a body lowered from a target is judged for api.write alone (#37815 M1)`. They pinned the two skips this PR removes; the new file pins the opposite. Their authored-body halves stay covered by the same file's arm (a)/(b) cases. The two predicate imports go with them. - `packages/cli/test/lower-callables.test.ts`: comment only, over the `[#38653]` target-shape pin, which named `isLoweredTargetBody`. The pin itself is unchanged. ## Acceptance notes - The lowered hook finding's path stays `hooks[N].body.capabilities` on the seat's answer (claim amendment 5). Its premise, that a fresh build never draws the finding, holds again at this head for every spelling the PARITY pin enumerates; for an artifact that lost a grant, or a hand-written body, that key is the right one. ## Deliberate correction `Check Changeset` (`check-empty-changeset`) is red on purpose: this PR edits a pending release note it did not add. DELIBERATE CORRECTION, not a collision; ⛔ do not restore the base text. Both files below are unreleased (merged after 19.0.0-next.2) and ship in the same release as this PR, and this PR makes their sentences about lowered bodies false. Text only: no code, no entry id, no level or disposition line changes. Scope per claim amendment 5 (7276409399); rewrites 2 and 4 of the changeset and 3 and 4 of the entry re-trued per L2 7278772654. **`.changeset/37815-body-capabilities-every-gate.md`** 1. BREAKING paragraph. Before: "whose authored L2 body calls a member". After: "whose L2 body calls a member". 2. `hook-body-capability-undeclared` bullet. Before: "an authored L2 hook body that calls any of those gates" … "Only a body the author wrote is judged: a hook body `os build` / `os verify` lowered from an inline `handler` is not, since its grant is the build's inference (the lowered reading is #38653)." After: "an L2 hook body that calls any of those gates" … "A hook body `os build` / `os verify` lowered from an inline `handler` is judged the same way: its grant is the one the build inferred from its calls, and the build reads each gated call in each spelling the rule reads." 3. `action-body-capability-undeclared` bullet. Before: "an authored L2 action body that calls a gate other than the writes without its token. An action body `os build` / `os verify` lowered from an inline `target` function is not judged for these tokens, since its grant is the build's inference (the lowered reading is #38653); its writes are still judged under `action-body-write-capability-undeclared`." After: "an L2 action body that calls a gate other than the writes without its token. An action body `os build` / `os verify` lowered from an inline `target` function is judged the same way, against the grant the build inferred from its calls." 4. Paragraph after FROM → TO. Before: "A hook whose body was lowered from an inline `handler` is unchanged: FROM and TO alike, it is not judged by this rule. So is an action whose body was lowered from an inline `target` function, for every token but `api.write`: … TO, it still builds clean, and its writes are judged as before." After: "A hook written as an inline `handler`, and an action written as an inline `target` function, need no change: the build infers the grant from each gated call in each spelling the rule reads (`?.`, whitespace or a comment between steps, the optional call), so the body it lowers carries the token. … TO, it still builds clean, its lowered body granted `api.transaction`." **`packages/spec/src/migrations/entries/semantic/19.hook-and-action-bodies-calling-an-ungranted-gate-refused.ts`** (entry `hook-and-action-bodies-calling-an-ungranted-gate-refused`, id unchanged) 1. Header comment. Before: "an authored L2 hook body that calls". After: "an L2 hook body that calls". 2. `surface`. Before: "only a body the author wrote (a hook body lowered from an inline handler is not judged, and an action body lowered from an inline target function is judged for its writes alone, as before)". After: "whether the author wrote the body or os build lowered it from an inline handler or target function". 3. `replacement`, last sentence. Before: "needs no change for the other tokens: its lowered body is not judged for them (a later change carries the lowered reading)." After: "needs no change: os build infers the grant from each gated call in each spelling the rule reads (?., whitespace or a comment between steps, the optional call), so the body it lowers carries the token, and that lowered body is judged like an authored one." 4. `reason`. Before: "A hook body os build lowered from an inline handler is not judged, and an action body it lowered from an inline target function is judged only for api.write, as before: such a grant is the build's inference, not the author's, and the inference does not yet read every gated shape, so a hook written as a handler and an action written as a target function are unchanged." After: "A hook body os build lowered from an inline handler, and an action body it lowered from an inline target function, are judged the same way: their grant is the build's inference, which reads each gated call in each spelling the rule reads, pinned spelling by spelling against the rule, so a hook written as a handler and an action written as a target function build clean." ## Verification Two-minute check: `pnpm --filter @objectstack/cli exec vitest run test/extract-hook-body-local-alias-38690.test.ts`. Expect 1 file, 284 tests passed. With `MEMBER_STEP` in `extract-hook-body.ts` set back to a plain `\.`, 84 of them fail. Read first: the `MEMBER_STEP` / `memberLeafRx` / `blankComments` block and the inference loop in `packages/cli/src/utils/extract-hook-body.ts`, then the PARITY block in the test above, then the two removed skips in `packages/lint/src/validate-action-body-capabilities.ts`. <details><summary>Local gates at 3ca3538 (head)</summary> - Derived round: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` listed 122 commands (the 119 of the last round plus `check:i18n`, `check:i18n-coverage`, `check:i18n-walk-parity`); each ran with stdin closed and its exit recorded before any pipe: 121 :: exit 0, and `node scripts/check-empty-changeset.mjs --base origin/main` :: exit 1, the DELIBERATE CORRECTION refusal above, by design. `dispatch-gates --ran`: 122 derived, 122 run, 0 NOT-MEASURED, 0 UNRUN. - Packages: `pnpm --filter @objectstack/lint test` 252 files / 10106 tests passed; cli `vitest run --project unit` 451 files / 6737 tests passed; `pnpm --filter @objectstack/lint typecheck` and `pnpm --filter @objectstack/cli typecheck` exit 0; spec rebuilt, `src/migrations` 5 files / 209 tests passed. - `node scripts/check-changeset-no-major.mjs --base origin/main --event` over this body: exit 0 (level axis: `@objectstack/lint` minor carries `Metadata-protocol: narrowed`; ADR-0087 `registered lowered-hook-and-action-bodies-capabilities-judged`). - `node scripts/pm/overlap-check.mjs` at this head: clean against origin/main (f576dee), #38497 and #38192. - Not run locally: the cli `integration` layer and `test:repo` (CI's Test Core); the dogfood battery is CI's on this head (`!` title, narrowing arm). </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmSa9QNE6qXdrFAvnUr)_ <!-- signed: repo:objectstack#3 · os-steve · session_01ADHkmSa9QNE6qXdrFAvnUr --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 16aa8b9 commit 94b3463

14 files changed

Lines changed: 609 additions & 246 deletions

‎.changeset/37815-body-capabilities-every-gate.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Skills-docs: follow-up #38655
1111

1212
<!-- adr-0087: registered hook-and-action-bodies-calling-an-ungranted-gate-refused -->
1313

14-
**BREAKING** for the publish of an action, an object or a hook whose authored L2 body calls a member the QuickJS sandbox gates without that member's token in `body.capabilities`. Such a body saved and published before; the sandbox refused the call with `403 INSUFFICIENT_PRIVILEGES` every time the body reached it, so it never worked. It is refused now, at the runtime publish door and in `os validate` / `lint` / `compile` / `build`, with the token named. The schema is unchanged and stored metadata is not rewritten or refused at boot; the refusal comes at the next publish.
14+
**BREAKING** for the publish of an action, an object or a hook whose L2 body calls a member the QuickJS sandbox gates without that member's token in `body.capabilities`. Such a body saved and published before; the sandbox refused the call with `403 INSUFFICIENT_PRIVILEGES` every time the body reached it, so it never worked. It is refused now, at the runtime publish door and in `os validate` / `lint` / `compile` / `build`, with the token named. The schema is unchanged and stored metadata is not rewritten or refused at boot; the refusal comes at the next publish.
1515

1616
The gates are the sandbox runner's own, token by token, and the rule's list is pinned to the runner's source: the `ctx.api.object(…)` read leaves (`find`, `findOne`, `count`, `aggregate`) behind `api.read`, the write leaves behind `api.write`, `ctx.api.transaction(…)` behind `api.transaction`, `ctx.log.debug|info|warn|error(…)` behind `log`, `ctx.crypto.randomUUID()` behind `crypto.uuid`, `ctx.email.send(…)` behind `email.send`, `ctx.activity.append(…)` behind `activity.append`, and on a hook body `ctx.title(FIELD)` with an argument behind `api.read` (`ctx.title()` needs no token).
1717

18-
- `hook-body-capability-undeclared` (new): an authored L2 hook body that calls any of those gates without its token. A hook body is never granted `email.send`, so its `ctx.email.send(…)` call is refused with the remedy that works: remove the call and send the mail from an action, a job or a flow. Only a body the author wrote is judged: a hook body `os build` / `os verify` lowered from an inline `handler` is not, since its grant is the build's inference (the lowered reading is #38653). Runs on the runtime `hook` door.
19-
- `action-body-capability-undeclared` (new): an authored L2 action body that calls a gate other than the writes without its token. An action body `os build` / `os verify` lowered from an inline `target` function is not judged for these tokens, since its grant is the build's inference (the lowered reading is #38653); its writes are still judged under `action-body-write-capability-undeclared`. Runs on the runtime `action` and `object` doors.
18+
- `hook-body-capability-undeclared` (new): an L2 hook body that calls any of those gates without its token. A hook body is never granted `email.send`, so its `ctx.email.send(…)` call is refused with the remedy that works: remove the call and send the mail from an action, a job or a flow. A hook body `os build` / `os verify` lowered from an inline `handler` is judged the same way: its grant is the one the build inferred from its calls, and the build reads each gated call in each spelling the rule reads. Runs on the runtime `hook` door.
19+
- `action-body-capability-undeclared` (new): an L2 action body that calls a gate other than the writes without its token. An action body `os build` / `os verify` lowered from an inline `target` function is judged the same way, against the grant the build inferred from its calls. Runs on the runtime `action` and `object` doors.
2020
- `action-body-write-capability-undeclared` is unchanged: an action body's write without `api.write` keeps its id and its words.
2121

2222
## FROM → TO
@@ -25,6 +25,6 @@ The gates are the sandbox runner's own, token by token, and the rule's list is p
2525
- Authored action body, other tokens (arm b). FROM: `body: { language: 'js', source: 'await ctx.api.transaction(async () => { … })', capabilities: ['api.write'] }` saved and threw at every run. TO: declare the token, `capabilities: ['api.write', 'api.transaction']` (likewise `log`, `crypto.uuid`, `email.send`, `activity.append`, `api.read` for the call the finding names).
2626
- Authored hook body calling `ctx.email.send(…)`. FROM: saved and threw at every run. TO: remove the call and send the mail from an action, a job or a flow.
2727

28-
A hook whose body was lowered from an inline `handler` is unchanged: FROM and TO alike, it is not judged by this rule. So is an action whose body was lowered from an inline `target` function, for every token but `api.write`: FROM, `actions: [{ …, target: async (ctx) => { await ctx.api.transaction(…) } }]` built clean; TO, it still builds clean, and its writes are judged as before.
28+
A hook written as an inline `handler`, and an action written as an inline `target` function, need no change: the build infers the grant from each gated call in each spelling the rule reads (`?.`, whitespace or a comment between steps, the optional call), so the body it lowers carries the token. FROM, `actions: [{ …, target: async (ctx) => { await ctx.api.transaction(…) } }]` built clean; TO, it still builds clean, its lowered body granted `api.transaction`.
2929

3030
`os explain hook-body-capability-undeclared` and `os explain action-body-capability-undeclared` carry an entry for each. `@objectstack/lint` exports the two rule id constants, `ACTION_BODY_CAPABILITY_UNDECLARED` and `HOOK_BODY_CAPABILITY_UNDECLARED`. `@objectstack/spec` adds only the upgrade-guide entry `hook-and-action-bodies-calling-an-ungranted-gate-refused`.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/lint': minor
3+
'@objectstack/cli': patch
4+
'@objectstack/spec': patch
5+
---
6+
7+
feat(lint)!: a hook or action body beside a string `handler` or `target` is judged for every capability it calls, like any other body
8+
9+
Clause-②: no (narrowing)
10+
Metadata-protocol: narrowed
11+
12+
<!-- adr-0087: registered lowered-hook-and-action-bodies-capabilities-judged -->
13+
14+
**BREAKING** for the publish of a hook or action whose body sits beside a string `handler` or `target`, lowered by the build or written by hand, when that body calls a member the QuickJS sandbox gates without the member's token in `body.capabilities`. The rules took such a body for one the build lowered and skipped it: `hook-body-capability-undeclared` did not judge a hook body the build lowered, nor any hook body beside a string `handler` at the runtime publish doors, and `action-body-capability-undeclared` did not judge an action body beside a string `target` (its writes were judged, under `action-body-write-capability-undeclared`). Both judge it now, at the runtime publish doors and in `os validate` / `lint` / `compile` / `build`, with the token named. Such a body never worked: the sandbox refused the call with `403 INSUFFICIENT_PRIVILEGES` every time the body reached it. A body written by hand declares the token in `body.capabilities`; a build artifact is rebuilt.
15+
16+
An inline `handler` or `target` function needs no change: `os build` infers the grant from each gated call the rule reads, in each spelling the rule reads. That is every gate of the rule's census through `ctx.MEMBER`, a local bound once to it, a destructure off `ctx`, a handle bound once to `ctx.api.object(…)` and a hook handler's destructured context parameter (and, past the rule, a renamed one), with `?.` or whitespace on either side of a step, the optional call `LEAF?.(…)`, and a comment between steps. Before this release `os build` read `ctx.log?.info(…)`, `ctx?.crypto.randomUUID()`, `ctx.activity?.append(…)`, `ctx.email?.send(…)`, `ctx.title?.(field)`, the same calls with whitespace or a comment between steps, and their rebound siblings as no call at all, so the handler lowered without the token and failed at the call; it now lowers with it. A hook handler that calls `ctx.email.send` in any of those spellings is refused by the hook parse at build, as `ctx.email.send(…)` already was: a hook body is never granted `email.send`. The build's reading is pinned against the rule's, spelling by spelling, by judging each one both ungranted (a finding) and lowered (none); it is a superset of the rule's reading by that enumeration, not by proof. Measured over the first-party example and connector apps, loaded, normalized and lowered as `os validate` does: no body newly refused.
17+
18+
## FROM → TO
19+
20+
- A hook body beside a string `handler`, written by hand or left by a build artifact. FROM: `hooks: [{ …, handler: 'my_hook_fn', body: { language: 'js', source: "const l = ctx.log; l.info('x')", capabilities: [] } }]` published clean and threw at every run. TO: refused with `hook-body-capability-undeclared` naming `log`; declare `capabilities: ['log']`, or rebuild the artifact (the build grants `log`).
21+
- An action body beside a string `target`, written by hand or left by a build artifact. FROM: `actions: [{ …, target: 'my_action_fn', body: { language: 'js', source: 'await ctx.api.transaction(async () => { … })', capabilities: ['api.write'] } }]` published clean and threw at every run. TO: refused with `action-body-capability-undeclared` naming `api.transaction`; declare `capabilities: ['api.write', 'api.transaction']`, or rebuild it.
22+
- An inline handler that spells a gated call with `?.`. FROM: `handler: async (ctx) => { ctx.log?.info('x'); }` lowered to `capabilities: []` and failed at the call. TO: it lowers to `capabilities: ['log']` and runs.
23+
24+
`os explain hook-body-capability-undeclared` and `os explain action-body-capability-undeclared` no longer say a lowered body is exempt. `@objectstack/lint` now exports `SANDBOX_CAPABILITY_GATES` and its `SandboxCapabilityGate` type, the sandbox's gate census the rule judges by. `@objectstack/spec` adds only the upgrade-guide entry `lowered-hook-and-action-bodies-capabilities-judged`.

‎content/docs/deployment/validating-metadata.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,9 @@ orthogonal to both, and no cell here can carry it; it is written out in
524524
| Script action bodies compile in the runtime's wrapper — an L2 action's `body.source` that does not compile as the body of `(async (input, ctx) => { … })`, most often `const input = …` redeclaring a parameter; an object write runs it over its inline `actions[]`, so an object write cannot republish a refused body (`action-body-does-not-compile`, #34884) | ✓ | ✓ | ✓ | ✓ᵃᶜᵒ |
525525
| Script action bodies hold the grant they call — an L2 action body that calls a `ctx.api` write (`insert`, `update`, `updateById`, `delete`, `updateMany`, `deleteMany`, `upsert`) without `api.write` in its `body.capabilities`, which the sandbox refuses at every call (`action-body-write-capability-undeclared`, #35143) | ✓ | ✓ | ✓ | ✓ᵃᶜᵒ |
526526
| Seed record keys — a seed record key, or a seed `columns` key, that names no field of the dataset's object, no system column injected on it and none of `id` / `created_at` / `updated_at`; the engine's insert door refuses such a record and the seed load loads the rest (`seed-record-unknown-field`, #35143) | ✓ | ✓ | ✓ | ✓ˢ |
527-
| Script action bodies hold every other grant they call — an authored L2 action body (one `os build` lowered from a `target` function is judged for its writes only) that calls a member the sandbox gates behind a token other than `api.write` without that token in its `body.capabilities`: a `ctx.api.object(…)` read leaf (`api.read`), `ctx.api.transaction(…)` (`api.transaction`), `ctx.log.*` (`log`), `ctx.crypto.randomUUID()` (`crypto.uuid`), `ctx.email.send(…)` (`email.send`) or `ctx.activity.append(…)` (`activity.append`), each refused by the sandbox at every call (`action-body-capability-undeclared`, #37815) | ✓ | ✓ | ✓ | ✓ᵃᶜᵒ |
527+
| Script action bodies hold every other grant they call — an L2 action body (authored, or lowered by `os build` from a `target` function) that calls a member the sandbox gates behind a token other than `api.write` without that token in its `body.capabilities`: a `ctx.api.object(…)` read leaf (`api.read`), `ctx.api.transaction(…)` (`api.transaction`), `ctx.log.*` (`log`), `ctx.crypto.randomUUID()` (`crypto.uuid`), `ctx.email.send(…)` (`email.send`) or `ctx.activity.append(…)` (`activity.append`), each refused by the sandbox at every call (`action-body-capability-undeclared`, #37815) | ✓ | ✓ | ✓ | ✓ᵃᶜᵒ |
528528
| Hook and job bodies compile in the runtime's wrapper — an L2 hook or job `body.source` that does not compile as the body of `(async (ctx) => { … })`, most often `const ctx = …` redeclaring the parameter or one name declared twice; no door publishes a job, so the publish column is the `hook` write alone (`hook-body-does-not-compile`, `job-body-does-not-compile`, #34987) | ✓ | ✓ | ✓ | ✓ʰ |
529-
| Hook bodies hold the grant they call — an authored L2 hook body (one `os build` lowered from a `handler` is not judged) that calls a member the sandbox gates without its token in `body.capabilities`: a `ctx.api.object(…)` read or write leaf, `ctx.api.transaction(…)`, `ctx.log.*`, `ctx.crypto.randomUUID()`, `ctx.activity.append(…)` or the related-record form `ctx.title(FIELD)`, each refused by the sandbox at every call; and any `ctx.email.send(…)`, which a hook body is never granted (`hook-body-capability-undeclared`, #37815) | ✓ | ✓ | ✓ | ✓ʰ |
529+
| Hook bodies hold the grant they call — an L2 hook body (authored, or lowered by `os build` from a `handler`) that calls a member the sandbox gates without its token in `body.capabilities`: a `ctx.api.object(…)` read or write leaf, `ctx.api.transaction(…)`, `ctx.log.*`, `ctx.crypto.randomUUID()`, `ctx.activity.append(…)` or the related-record form `ctx.title(FIELD)`, each refused by the sandbox at every call; and any `ctx.email.send(…)`, which a hook body is never granted (`hook-body-capability-undeclared`, #37815) | ✓ | ✓ | ✓ | ✓ʰ |
530530
| Approval-node approvers (ADR-0090 D3) | ✓ | ✓ | ✓ | ✓ᶠ |
531531
| Security posture (ADR-0090 — e.g. every custom object declares `sharingModel`) | ✓ | ✓ | ✓ | ✓ˢᵖᵉᵇᵒ |
532532
| Security vocabulary freeze (ADR-0090 D3 — the reserved word, replaced by `permission_set` / `position` / `business_unit`) | ✓ | ✓ | ✓ | ✓ᵒᵖᵉᵇᵖᵒᵃᵒˣ |

0 commit comments

Comments
 (0)