Commit 627e65a
fix(runtime): converge /automation run-state reads on the sys_automation_run read grant (#7969)
* fix(runtime): converge /automation run-state reads on the sys_automation_run read grant
`GET /automation/:name/runs/:runId` answered `deps.success(run)` — the
ExecutionLogEntry verbatim, no projection, redaction or masking — behind the
#5519 anonymous baseline and nothing else. The only question the surface asked
was "are you authenticated?", so any authenticated caller who knew a run id read
the triggering record's fields with that record's own FLS never applying.
`GET /:name/runs` served the same entries under the same non-gate.
The identical snapshot's second door — `sys_automation_run.variables_json` —
has always gone through the system object's permissions. Per the maintainer
ruling of 2026-08-12, the two doors converge: both run-state reads now consult
`ISecurityService.explain({ object: 'sys_automation_run', operation: 'read' })`,
which runs the same permission-set resolution, evaluator and RLS compiler the
enforcement middleware runs. A caller without the grant gets 403
PERMISSION_DENIED and the automation service is never consulted; a caller with
it reads exactly what they read before.
Not per-field filtering of `variables` — rejected by the ruling as mechanically
undecidable. No new cross-package seam: the `security` slot was already on
DomainHandlerDeps.
The rest of the domain was audited against the same rule; the routes that stay
authenticated-only carry their reason at the route.
Fixes #7900
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKkycFdNjr44tbvpbJa4BA
* docs(automation): state the sys_automation_run grant the run-state reads now require
The "Observing runs" section and the endpoint table documented
`GET /:name/runs` and `GET /:name/runs/:runId` with no mention of the
permission they require, which after the gate lands understates the contract.
Both now name the grant and carry the permission-set snippet, and the callout
records why the screen re-fetch is deliberately not gated the same way.
Refs #7900
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKkycFdNjr44tbvpbJa4BA
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 86d2e5e commit 627e65a
4 files changed
Lines changed: 664 additions & 6 deletions
File tree
- .changeset
- content/docs/automation
- packages/runtime/src/domains
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
687 | 706 | | |
688 | 707 | | |
689 | 708 | | |
| |||
1238 | 1257 | | |
1239 | 1258 | | |
1240 | 1259 | | |
1241 | | - | |
1242 | | - | |
| 1260 | + | |
| 1261 | + | |
1243 | 1262 | | |
1244 | 1263 | | |
1245 | 1264 | | |
| |||
0 commit comments