Skip to content

fix(reads): gate summaries/pod + children-pods reads (final sweep)#378

Merged
samxu01 merged 1 commit into
mainfrom
fix/sweep-final-reads
May 15, 2026
Merged

fix(reads): gate summaries/pod + children-pods reads (final sweep)#378
samxu01 merged 1 commit into
mainfrom
fix/sweep-final-reads

Conversation

@samxu01
Copy link
Copy Markdown
Contributor

@samxu01 samxu01 commented May 15, 2026

Final pass on the read-leak sweep started in PR #375 and continued in PR #377.

Summary

Two pod-scoped read endpoints still admin-bypassed (returning 200 for any authenticated user regardless of pod membership):

  • GET /api/summaries/pod/:podId — returned full summary content
  • GET /api/pods/:id/children — leaked existence + names + members of nested pods under a parent

Both now run through DMService.canViewPod — same gate already used by /announcements, /files, /external-links, and PR #377's posts read paths. /children additionally filters its result array so a parent-visible-but-child-private layout still respects per-child membership.

Test plan

  • npx jest __tests__/unit/routes/pods __tests__/unit/controllers/podController — 62/62 passing
  • Post-deploy: GET /api/summaries/pod/<stranger's room> returns 403 (was 200)
  • Post-deploy: GET /api/pods/<stranger's pod>/children returns 403 (was 200)

…nd canViewPod

Final pass on the read-leak sweep started in PR #375 and continued in
PR #377. These two endpoints still 200'd for any authenticated user
regardless of pod membership:

- GET /api/summaries/pod/:podId — returned full summary text + content
- GET /api/pods/:id/children    — leaked existence, names, members of
                                  every child pod under a parent

Both now go through DMService.canViewPod (the same gate already used
by /announcements, /files, /external-links, and PR #377's posts
read paths). /children additionally filters its result array so a
parent-visible-but-child-private layout still respects per-child
membership. Members + admins + agent-dm §3.7 fan-out can read; all
others 403.
@samxu01 samxu01 merged commit 78c915c into main May 15, 2026
6 of 7 checks passed
lilyshen0722 added a commit that referenced this pull request May 15, 2026
Adds a new bullet under Agent Runtime — Quick Rules covering the
membership-by-default gate on the sidebar / listing / direct-ID
surfaces (admins do NOT bypass; ?scope=all is the admin opt-in)
and the canViewPod gate that pod-scoped read endpoints must call
before returning content.

Mirrors the pod-manager skill update in commonly-skills@e2ae064.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant