Repository navigation
[Codex Security] Best-effort membership cache invalidation allows access after project removal - #501
Merged
anandtopu merged 2 commits intoNov 28, 2026
Conversation
Signed-off-by: Anand Topu <56218058+anandtopu@users.noreply.github.com>
anandtopu
force-pushed
the
codex-security/arp_4c132ebfe9b508cd2fc47cea61b13acc
branch
from
November 28, 2026 06:59
cba4c93 to
dbab583
Compare
anandtopu
marked this pull request as ready for review
November 28, 2026 07:08
anandtopu
enabled auto-merge
November 28, 2026 07:16
Signed-off-by: Anand Topu <56218058+anandtopu@users.noreply.github.com>
anandtopu
force-pushed
the
codex-security/arp_4c132ebfe9b508cd2fc47cea61b13acc
branch
from
November 28, 2026 07:18
dbab583 to
e03ae70
Compare
anandtopu
deleted the
codex-security/arp_4c132ebfe9b508cd2fc47cea61b13acc
branch
November 28, 2026 07:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The patch makes PostgreSQL the project-membership authority and prevents stale Redis state from preserving revoked report access.
get_accessible_project_idsnow queries currentProjectMemberrows for ordinary user scopes and never reads or fills Redis.resolve_project_scopetherefore rejects a removed member before report data is queried, closing the five-minute post-revocation disclosure path.Static Verification Checks
PostgreSQL authority closes race (Passed) — backend/app/core/deps.py:get_accessible_project_ids queries current membership rows and never reads Redis, closing the stale-cache authorization path.
Report revocation regression (Passed) — test_all_projects_member_scope_postgres.py asserts allowed report access, committed membership removal denial, and retained administrator access.
Role and key compatibility (Passed) — get_accessible_project_ids preserves administrator, project-bound key, and role-floor branches, establishing legitimate authorization behavior remains intact.
Legacy cleanup cannot authorize (Passed) — invalidate_membership_cache only deletes residual Redis keys while authorization callers consume PostgreSQL results, preventing cleanup from granting access.
Deployment guidance reflects boundary (Passed) — architecture/SECURITY.md and user-guide/compliance.md require every read replica upgraded before relying on PostgreSQL authorization.
Finding:
acf_fc1727b012ab0f5cd1a4e0d6480f3642Patch:
arp_4c132ebfe9b508cd2fc47cea61b13accBase commit:
955292f065607646b431f08d6c2441c485a29b69Patch SHA-256:
d5c186aa9fa7cad1b5be3ab9242413b0c3770ab76174f1291edbe90a2584cd50