Commit 5f43f88
handleAnalytics dropped the request's execution context —
analyticsService.query(body) was called with no context, so the analytics
read-scope provider (getReadScope → security getReadFilter) received
undefined and applied NO tenant/RLS filter. An authenticated caller could
query analytics datasets and receive rows their row-level security would
otherwise hide.
Thread context.executionContext into query() and generateSql() (both
already accept it) so each object is scoped by its per-object read filter.
The analytics getReadFilter does not yet apply the ADR-0090 D10 agent
delegator intersection — latent (analytics isn't reachable over /mcp),
tracked in #2852. Found by the D10 adversarial security review.
Test: dispatcher asserts the execution context now reaches query/generateSql.
runtime http-dispatcher 165 green.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 01274eb commit 5f43f88
3 files changed
Lines changed: 41 additions & 4 deletions
File tree
- .changeset
- packages/runtime/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
386 | 406 | | |
387 | 407 | | |
388 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2040 | 2040 | | |
2041 | 2041 | | |
2042 | 2042 | | |
2043 | | - | |
| 2043 | + | |
2044 | 2044 | | |
2045 | 2045 | | |
2046 | 2046 | | |
| |||
2049 | 2049 | | |
2050 | 2050 | | |
2051 | 2051 | | |
2052 | | - | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
2053 | 2058 | | |
2054 | 2059 | | |
2055 | 2060 | | |
| |||
2061 | 2066 | | |
2062 | 2067 | | |
2063 | 2068 | | |
2064 | | - | |
2065 | | - | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
2066 | 2072 | | |
2067 | 2073 | | |
2068 | 2074 | | |
| |||
0 commit comments