Your anon key is public.Your data shouldn't be.
We attack every table as two users.You get the exact policy fix.
Why Supabase
RLS is your backend.
With Supabase, the browser queries your database directly using a public key that every visitor has. Row level security policies are the only thing deciding who reads what.
A table with RLS off, a policy that checks login instead of ownership, an update policy that lets users change user_id: each one turns your database public.
The security advisor checks configuration. Hetz tests behavior: it signs in as two users with your public key and tries to read, write and delete across them, in every table, bucket and function.
Supabase risks
The policies that leak.
Proven with the exact query and response.
- 01
RLS off
A table anyone with the anon key can read.
- 02
Login, not ownership
Any signed-in user reads every row.
- 03
Ownership changes
Updates that move rows or set role to admin.
- 04
Tenant checks
Org ids trusted from the client.
- 05
Definer functions and views
RPC and views that bypass RLS.
- 06
Storage policies
Buckets where any user reads any file.
In every Supabase test
What Hetz tests.
- 01Every table in exposed schemas, as two users and a visitor
- 02Select, insert, update and delete across accounts
- 03Ownership, role, plan and credit columns
- 04Views and security definer functions via RPC
- 05Edge functions called with another user's ids
- 06Storage buckets, paths and signed URLs
- 07Service role and secret keys in the frontend
- 08The exact SQL policy fix for every finding
How it works
Your domain in.Insights and fixes out.
This is the real run, step by step.Scroll and watch it.
Point it at your domain
Put in your domain and confirm it's yours. Hetz tests only what you own, and only what you approved.
Full fixes
Don't just find it.Fix it.
Every vulnerability ships with a complete fix.The patch, the test that proves it, and a prompt for your coding agent.Paste, merge, retest.Done.
- Written for your stack: Next.js, Supabase, Firebase, Laravel, Django and more
- Starts with a failing test, so the fix is proven, not hoped for
- Built with Lovable, Bolt or Base44? The prompt works there too
Any signed-in user can read any invoice
GET /api/invoices/{id}
Evidence
GET /api/invoices/8812 (as user 4471)
→ 200 OK {"customer":"user 1203", "total": …}You are fixing a verified security finding in a Next.js app with Supabase.
Finding: Broken object level authorization (CWE-639, OWASP API1:2023).
Endpoint: GET /api/invoices/{id}
Proof: a request as user 4471 for invoice 8812 (owned by user 1203) returned 200 with the invoice body.
Task:
1. Write a failing test that reproduces the request above.
2. Enforce ownership: only return the invoice when invoice.customer_id matches the signed-in user (or their organization). Add a Supabase RLS policy on the invoices table so the database enforces it too.
3. Return 404, not 403, for invoices the user does not own.
4. Make the test pass and list every other route that reads invoices by id.Go deeper
Read before you ship.
Supabase Security: Row Level Security Mistakes and How to Test Them
How to secure a Supabase app: row level security done right, the policy mistakes that leak data, service keys, storage and functions, and how to test it as an attacker.
Lovable Security: How to Test a Lovable App Before Launch
Built with Lovable? How its apps usually store data, the gaps that expose Supabase data most often, and how to test and fix them before your users arrive.
Firebase Security Rules: A Practical Guide to Testing Them
How Firebase security rules work for Firestore, Realtime Database and Storage, the mistakes that expose data, and how to test rules with two accounts before launch.
Secrets in Frontend Code: How to Find and Fix Exposed API Keys
Why API keys and tokens end up in browser code, how to find them in a built app, which keys are safe to expose and how to move secrets to the server.
FAQ
