Paste a URL you own or are authorized to test. Placeholder examples: target-app.com, my-app.lovable.app, or app.vercel.app. What this Supabase RLS scanner checks When you submit a deployed URL, the engine inspects the exact public surface an unauthenticated attacker sees in a browser: Supabase project & key extraction: Locates *.supabase.co URLs, public anon tokens, and accidentally shipped service_role keys in compiled Next.js or Vite bundles. PostgREST OpenAPI & table exposure: Probes /rest/v1/ using the public anon key to detect tables reachable without a user session or missing RLS enforcement. Leaked client secrets alongside Supabase: Checks the same JavaScript chunks for Stripe secret keys, OpenAI/Anthropic keys, and misconfigured NEXT_PUBLIC_ / VITE_ variables. Drop-in SQL & editor fix prompts: Outputs concrete PostgreSQL RLS migration templates and 1-click prompts for Cursor, Lovable, and Claude Code. Baseline PostgreSQL RLS fix pattern If a table in the public schema returns rows to the anon role, enable RLS immediately and lock every verb (SELECT, INSERT, UPDATE, DELETE) to an explicit ownership or tenant predicate: ALTER TABLE public.workspace_records ENABLE ROW LEVEL SECURITY; CREATE POLICY "tenant_members_read_own_records" ON public.workspace_records FOR SELECT TO authenticated USING ( workspace_id IN ( SELECT workspace_id FROM public.workspace_members WHERE user_id = auth.uid() ) ); Where public RLS checks stop — and real breaches still happen Passing an unauthenticated RLS check does not guarantee multi-tenant safety. In real SaaS audits, we regularly find Supabase breaches behind login where the anon role is completely locked down: Authenticated cross-tenant policies: Policies written as TO authenticated USING (true) block anonymous scanners but let any signed-up user read every other customer’s rows. Backend service_role bypasses: Next.js API routes, Server Actions, and Supabase Edge Functions that instantiate the admin client bypass RLS completely — turning a single missing .eq("org_id", ...) filter into a full cross-tenant IDOR. SECURITY DEFINER RPCs & Storage buckets: Custom Postgres functions and storage policies often outlive table migrations and expose another tenant’s records or signed uploads. To verify authenticated tenant boundaries across two real test accounts, book a tenant isolation test or a Deep Logic Sprint ($349) — delivered with reproducible cURL PoCs, drop-in SQL/TypeScript fixes, and a free 30-day retest. Related Security Research Database & Multi-TenancyThe Supabase Service-Role Trap: How Misplaced Keys Silently Disable PostgreSQL RLSUsing Supabase or PostgreSQL Row-Level Security? In Next.js Server Components, one misplaced service_role key turns your multi-tenant database into an open leak. Here is how it happens and the zero-trust fix.Read research → API Security & Multi-TenancyBatch API IDOR: Why Bulk Endpoints Are a Common Multi-Tenant Data Leak in Modern SaaSSingle-record endpoints often pass authorization checks, but bulk endpoints (/api/items/batch-delete, GraphQL bulk mutations) frequently loop over unscoped arrays. Here is how attackers exploit batch routes to drain competitor data—and the SQL/Prisma fix.Read research → Architecture & DefenseThe UUID Fallacy: Why Unguessable IDs Don't Protect SaaS from BOLA/IDORMany SaaS teams assume UUIDv4 primary keys eliminate Insecure Direct Object References. Here is how UUIDs leak, why ORMs make cross-tenant data leaks effortless, and how to fix it in Prisma and PostgreSQL.Read research → Not by itself. The Supabase anon key is designed to ship to browsers when Row Level Security (RLS) is enabled and correctly scoped on every table. Exposure becomes critical when RLS is disabled, policies are overly broad, or a service_role key ships to the client bundle. It fetches publicly reachable pages and compiled JavaScript bundles from a URL you authorize, extracts Supabase project URLs and client keys, checks for leaked service_role credentials, and runs non-destructive read-only PostgREST checks for publicly readable tables and schema metadata. No. The public scanner performs read-only HTTP checks only. It does not insert, update, delete, or run destructive load tests against your project. No. An unauthenticated scan only sees what is reachable with the public anon role. Authenticated cross-tenant RLS bugs — such as USING (true) for logged-in users, SECURITY DEFINER RPC leaks, or backend service_role bypasses — require an authorized two-tenant test. Enable RLS with ALTER TABLE public. ENABLE ROW LEVEL SECURITY, create explicit SELECT/INSERT/UPDATE/DELETE policies tied to auth.uid() or a verified tenant claim, and rotate any service_role key that ever appeared in a client JS chunk. Upgrade when you have paying multi-tenant customers, custom Edge Functions, Next.js Server Actions using the service_role client, or Stripe billing workflows. The Deep Logic Sprint tests authenticated tenant boundaries and delivers reproducible cURL PoCs and drop-in fixes.
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL
Show HN: Read-only scanner for exposed Supabase RLS tables and bundle keys
Article URL: https://breachsweep.com/supabase-rls-scanner Comments URL: https://news.ycombinator.com/item?id=50633658 Points: 1 # Comments: 0
翻訳サービスが停止中のため原文を表示しています。