docs: privacy impact assessment + tenancy defense-in-depth review#330
Merged
Conversation
Analysis-only (no product code changes). Two documents from a multi-agent audit (one auditor per API route family) with independent adversarial verification of every claim against source and the live Supabase project. - privacy-impact-assessment.md: clinical-data flow map, OpenAI egress + cross-border (US) analysis, per-table logging/redaction (M15 HMAC verified present but conditional), retention/purge (both crons verified live-active), Sydney data residency, storage access, APP/WA assessment, risk-ranked gaps. - tenancy-defense-in-depth-review.md: all 33 API routes audited for a missed/ bypassable owner_id filter (0 confirmed cross-tenant leaks), RPC SQL-body owner-filter table, response-cache analysis, and an honest cost/benefit on owner-scoped RLS as a second layer (fail-open RPC helper is the key caveat). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Satisfies the required verify-job format:check gate (markdown tables and emphasis normalized). No content changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BigSimmo
marked this pull request as ready for review
July 6, 2026 14:50
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
BigSimmo
enabled auto-merge
July 6, 2026 14:51
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.
What this is
Analysis-only. No product code changes — two new documents under
docs/.Produced by a multi-agent audit: one auditor agent per API route family, with every claimed gap independently re-verified against source and the live Supabase project (
sjrfecxgysukkwxsowpy, regionap-southeast-2/ Sydney).Deliverable 1 —
docs/privacy-impact-assessment.mdFull clinical-data flow map (the incidental-PHI path where a clinician types patient details into a query). Covers:
store:false, forced 24h prompt cache) and the cross-border (APP 8) posture.query-privacy.ts:17-23) but downgrades to unsalted SHA-256 ifRAG_QUERY_HASH_SECRETis unset, which nothing enforces in prod.pg_cronpurges (rag_queries30d,rag_retrieval_logs90d) verified live and active;rag_query_misseshas no purge.Deliverable 2 —
docs/tenancy-defense-in-depth-review.mdAdversarial audit of all 33 API routes for a missed/bypassable
owner_idfilter (RLS is deliberately service-role-only, so the app layer is the only boundary).retrieval_owner_matchesfails open on aNULLfilter — the DB has no independent tenancy floor; only the app-layer throw-on-missing-owner prevents a leak.setup-status:165raw error string) + two latent/operator notes.Notes
🤖 Generated with Claude Code