Repository navigation
Commit 84d0636
committed
fix(approvals): stop pushing a free-text predicate onto a masked payload snapshot
The approval payload snapshot is redacted at serve time, per reader (#10749),
but `listRequests` / `countRequests` pushed a free-text disjunct onto the stored
column, which the driver evaluates unmasked. The field-level read controls
enforced on the way out therefore did not hold on the way in — declared, not
enforced. This extends the settled `maskingRule` posture (#8993) to the snapshot
column: a caller whose view of the snapshot is masked keeps free-text matching
on the four columns of `sys_approval_request` they read whole, and loses only
the snapshot disjunct.
The masked/unmasked verdict comes from the same authority and the same
per-caller call the serve path uses, asked as the caller — never a second,
independently derived notion of "redacted", since that drift is the defect one
layer down. Where serve declines to narrow (no authority wired, or a wired
authority answering "unresolvable"), the disjunct is kept: consistency with
serve, not blanket fail-closed.
Dropping a disjunct is strictly narrowing — no query is refused, nothing is
widened — and four disjuncts always remain, so the `$or` is never empty.
Part of #110401 parent 4257e4e commit 84d0636
3 files changed
Lines changed: 488 additions & 9 deletions
File tree
- .changeset
- packages/plugins/plugin-approvals/src
Lines changed: 52 additions & 0 deletions
| 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 | + | |
0 commit comments