StateStore RPC ListPolicies (internal/infrastructure/staterpc/access.go) and Store.ListPolicies (internal/infrastructure/postgres/access.go), query ListAccessPolicies in internal/infrastructure/postgres/queries/access.sql: no org filter, so every org's policy text goes to any caller. The dashboard handler filters in Go after the fact, so the leak is at the RPC. The in-process policy engine needs all rows, so keep an unscoped path for it. Done when the query filters on the caller's org, plus instance-level rows for instance viewers.
Acceptance criteria
ListPolicies returns only the caller organization and applicable instance-level policies; the policy engine retains its all-row path.
Imported from beads archie-core-kgxw.25 · GitHub #1590 · type bug · priority P1 · created 2026-10-10 · closed 2026-10-11
StateStore RPC ListPolicies (internal/infrastructure/staterpc/access.go) and Store.ListPolicies (internal/infrastructure/postgres/access.go), query ListAccessPolicies in internal/infrastructure/postgres/queries/access.sql: no org filter, so every org's policy text goes to any caller. The dashboard handler filters in Go after the fact, so the leak is at the RPC. The in-process policy engine needs all rows, so keep an unscoped path for it. Done when the query filters on the caller's org, plus instance-level rows for instance viewers.
### Acceptance criteria
ListPolicies returns only the caller organization and applicable instance-level policies; the policy engine retains its all-row path.
### Close reason
Fixed on feat/org-epic (PR #1634)
---
_Imported from beads `archie-core-kgxw.25` · GitHub #1590 · type bug · priority P1 · created 2026-10-10 · closed 2026-10-11_
sam
added the highbug labels 2026-10-27 13:35:49 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
StateStore RPC ListPolicies (internal/infrastructure/staterpc/access.go) and Store.ListPolicies (internal/infrastructure/postgres/access.go), query ListAccessPolicies in internal/infrastructure/postgres/queries/access.sql: no org filter, so every org's policy text goes to any caller. The dashboard handler filters in Go after the fact, so the leak is at the RPC. The in-process policy engine needs all rows, so keep an unscoped path for it. Done when the query filters on the caller's org, plus instance-level rows for instance viewers.
Acceptance criteria
ListPolicies returns only the caller organization and applicable instance-level policies; the policy engine retains its all-row path.
Close reason
Fixed on feat/org-epic (PR #1634)
Imported from beads
archie-core-kgxw.25· GitHub #1590 · type bug · priority P1 · created 2026-10-10 · closed 2026-10-11