# Supabase & Lovable SQL Leak Checker & PR-Only Proof > Free zero-upload in-browser SQL & RLS pattern checker plus PR-only PostgreSQL 16.4 (`PGlite`) customer-isolation and DB+Storage restore proof harness, built by Umit Dopac (`@UmitDopac`, IT Ops Specialist in Istanbul). ## Live Tool & Repository - Interactive Free Checker (0 bytes uploaded, runs 100% in browser): https://umut-dpc.github.io/supabase-proof-demo/ - Open-Source PGlite Proof Harness (GitHub): https://github.com/umut-dpc/supabase-proof-demo - Sample Proof Report (observed PostgreSQL 16.4 BEFORE -> AFTER run): https://github.com/umut-dpc/supabase-proof-demo/blob/main/reports/PROOF-REPORT.md - Direct Pilot Request Without Marketplace Account (GitHub Issue Form): https://github.com/umut-dpc/supabase-proof-demo/issues/new?template=launch-proof-request.yml - Author X / Contact: https://x.com/UmitDopac ## Failure Classes Detected & Tested 1. **Cross-Tenant Table RLS Leaks (`public.invoices`):** Overly broad policies such as `USING (true)` or missing `ENABLE ROW LEVEL SECURITY` / `WITH CHECK` policies letting authenticated Customer B read or modify Customer A rows even while RLS looks enabled. 2. **RPC Privilege Escalation (`SECURITY DEFINER`):** Unguarded `SECURITY DEFINER` PostgreSQL functions bypassing table RLS unless rewritten as `SECURITY INVOKER` + membership helper or explicit caller membership check. 3. **Storage Bucket Policy Leaks (`storage.objects`):** Bucket-only policies lacking tenant folder/prefix ownership checks (`storage.foldername(name)`), letting Customer B list or read Customer A files. 4. **Payment Webhook Signature & Replay Idempotency:** Accepting forged payloads without constant-time HMAC signature validation or missing `UNIQUE` event ID idempotency constraints. 5. **Frontend Credential Exposure:** Leaking privileged `service_role` JWTs, secret env vars, or live keys inside browser-shipped bundles. 6. **DB-Only Backup Blind Spot for Supabase Storage:** PostgreSQL dumps/backups do not automatically back up files stored in Supabase Storage buckets; isolated DB+Storage restore drills verify matching SHA-256 checksums across both layers. ## Observed PostgreSQL 16.4 PGlite Benchmark (`BEFORE -> AFTER PR`) Executed locally via `node scripts/run-proof.mjs` against `PostgreSQL 16.4` (`@electric-sql/pglite` with local `auth`/`storage` shims) with zero production credentials or customer PII: - `1A. Cross-Tenant Table RLS`: `1` leaked Customer A row to Customer B -> `0` leaked rows - `1B. SECURITY DEFINER RPC`: `1` leaked row bypass -> `0` leaked rows (`SECURITY INVOKER`) - `1C. Storage Bucket Policy`: `1` leaked file in `client-files` -> `0` leaked files - `2. Webhook HMAC & Replay`: forged accepted + `2 rows / 19800 cents` on replay -> forged rejected + `1 row / 9900 cents` (`duplicate_ignored`) - `3. Frontend Secret Scan`: `3` findings (`privileged_jwt_in_frontend`, `public_env_var_secret_name`, `sk_live_`) -> `0` findings - `4. Backup & Recovery Drill`: DB-only restore `2/2` DB rows, `0/2` Storage blobs -> Full restore `2/2` DB rows, `2/2` SHA-256 verified blobs, `0` RLS leaks on restored DB ## Free Preview Mode: Browser Check & 3 Free Case-Study Pilot Reviews Zero production database credentials, zero live customer PII, clean Git branch deliverables only: 1. **Free 10-Second Browser SQL Pattern Check:** Paste SQL migrations or schemas locally; 0 bytes leave the browser. Flags risky patterns — does not prove full application security. 2. **3 Free PR-Only Case-Study Pilot Reviews (Optional):** For one scoped data-access flow, I run isolated fake-data tests on a clean Git branch and open `1` fix PR containing executable before/after test proof and a 1-page summary inside the PR, in exchange for anonymized case-study permission only. ## Scope & Boundaries This tool and pilot review run strictly on Git branches and synthetic test fixtures (`@electric-sql/pglite` 16.4 local shim + Node restore script — not hosted GoTrue or live production Supabase). Merge and deployment remain under owner control. No warranty, no SLA, and not a formal legal, SOC 2, HIPAA, or GDPR compliance certification.