reviews: Astra task review of Task 10, round 1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+27
−0
docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-task10-R1.md+27 −0
diff --git a/docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-task10-R1.md b/docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-task10-R1.md| new file mode 100644 |
| index 000000000..db8eb8c91 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-task10-R1.md |
| @@ -0,0 +1,27 @@ |
| +Two P1 findings block this task. |
| + |
| +1. **P1 — Catch-all owners can purge another account’s case 3 entries.** |
| + Evidence: [purge_header.go:893](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/purge_header.go:893), [purge_header.go:804](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/purge_header.go:804), [pagecache.go:192](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/pagecache.go:192). |
| + |
| + **Failure scenario:** Account A’s remote front `H` selects its local target `T`. Account B’s local route `W` has a catch-all covering `H`. A cacheable response from `T` is stored under `H`. A response from `W` declaring `Carlos-Purge-Host: H` passes the existing wildcard tenancy and ownership checks; `*` removes A’s entries. Even without naming `H`, `Carlos-Purge: all` discovers it through `instanceHostsIn` and unconditionally purges it. This attack does not require the no-mesh-key fallback. |
| + |
| + **Fix:** Make eviction account-aware for hosts shared by catch-all and case 3 traffic, including explicit targets, `*`, cap degradation and `all` expansion. Record trustworthy account/instance identity on every LRU entry; the optional generation tag is insufficient. Authorize the purge against the current routing snapshot and filter entries by the permitted account. |
| + |
| + **Invariant / fault family:** Purge authority must follow cache-entry tenancy; a wildcard match does not establish exclusive ownership of a host’s cache. |
| + |
| +2. **P1 — A valid case 3 target cannot purge its cached responses when a catch-all covers the front.** |
| + Evidence: [purge_header.go:532](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/purge_header.go:532), [purge_header.go:888](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/purge_header.go:888), [pathselect.go:119](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/pathselect.go:119). |
| + |
| + **Failure scenario:** Selection deliberately runs case 3 when `H` lacks an exact local entry but matches a catch-all. Its response can enter the LRU under `H` at [edge.go:2992](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/edge.go:2992). Purge instead follows the catch-all’s ordinary branch and rejects `T` when the catch-all belongs to another account—or another app without a local prefix naming `T`. Exact-URL, path and whole-host invalidation therefore fail. |
| + |
| + **Fix:** Apply the remote-front eligibility rule whenever the front lacks an exact local entry, consistent with selection. Pair that change with finding 1’s account-aware eviction. Add tests that cache responses from both accounts under one front, successfully purge the target’s entries, preserve the other account’s entries, and refuse after the prefix or ownership changes. |
| + |
| + **Invariant / fault family:** The same shared-host authority boundary as finding 1: selection and purge must agree without granting cross-account eviction. |
| + |
| +The implementer’s safety concern is real: [pathhop.go:189](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/pathhop.go:189) permits the catch-all fallback without a mesh key. Simply broadening the whole-host authorization would be unsafe; the present refusal also leaves the reverse attack open. |
| + |
| +The remaining checks look sound by inspection: ordinary same-box branches retain their previous behavior; platform-alias targets use the same canonical-instance eligibility as selection; unsuccessful remote overrides evict nothing for that host. The new tests insert real LRU entries and exercise refusal after prefix removal, movement and instance replacement, but omit the shared-host cases above. |
| + |
| +No files changed. The focused test run stopped because Go attempted to update read-only `go.mod`; tests did not execute. GOCACHE was left unset. |
| + |
| +NOT READY |
| \ No newline at end of file |