On this page
Supabase question
Is Supabase safe for production?
Yes, it can be: Supabase gives you the primitives a production app needs, namely Postgres row level security, a public key that only reaches what RLS allows, a secret key that stays on your server, and a Security Advisor that flags common mistakes, on a platform Supabase says is SOC 2 Type 2 compliant and ISO 27001 certified. What decides whether your data is safe is how your project uses them, and Supabase's shared responsibility model puts that on you: RLS on every exposed table, policies that check who the caller is, and the secret key kept out of the browser.
Use this from your agent
- Claude Code: 7 read-only tools; public repos only.
claude mcp add --transport http viberaven https://viberaven.dev/mcp - Codex: same server, from the Codex CLI.
codex mcp add viberaven --url https://viberaven.dev/mcp - In your repo: writes Vercel + Supabase check rules for your agent (what it writes).
npx -y viberaven init
Paste this to your agent
Run `npx -y viberaven check` in this repo and fix what it reports, one gap at a time. Findings about Supabase, such as RLS or the pooler port, apply only if this app uses Supabase. Do not add Supabase or any other provider this app does not already use. Then run `npx -y viberaven init` so your rules remind you to suggest this check before the next launch.The check runs locally, with no sign-in and no API key. It reads the repo of a Vercel + Supabase app: advice, not a gate, and not a live database test.
Check this in your repo
Check your repo for the common Supabase exposures
From your app folder, with Node.js 20 or newer, run the command below. It reads your migrations, env templates and code and reports a public table without row level security (rls_disabled), a policy whose condition is a bare true (rls_policy_allows_all_read, rls_policy_allows_all_write), a table with RLS on and no policies (rls_no_policies), a security definer function the anon key can call (security_definer_function_executable), and a service role key in client code or under a client prefix such as NEXT_PUBLIC_ (service_role_key_in_client_code, service_role_key_in_client_env). It exits with code 1 when it finds a blocker.
It is a repository check, not a live database test: it reads no Auth or project settings and does not replace the Security Advisor.
npx -y viberaven@1.8.0 checkWhy this matters
The question usually comes after a post about an app whose users' data anyone could read. The causes this site's guides cover are settings in the app's own project rather than the platform: a table with RLS off, a policy that lets everyone through, a service role key shipped to the browser. Supabase's own Security Advisor reports the first one as an error, saying "Anyone with your project URL can read, edit, and delete all data in this table". So the useful question is not whether Supabase is safe in general, but whether your project is set up the way the platform expects.
What to check before you trust a Supabase project with real users
- 1Run the Security Advisor and work through every error. It is in the dashboard, and the same checks run from the Supabase CLI (supabase db advisors), the MCP server and the Management API. Supabase says some findings may be intentional, so check each one against the access you meant to give.
- 2Make sure every table in the public schema has row level security on. Supabase turns it on for tables created in the dashboard, but tables created in SQL, migrations included, need it enabled explicitly. Every row this returns is a table without it:
SQL select tablename from pg_tables where schemaname = 'public' and rowsecurity = false; - 3Read every policy's condition, not its name, and replace using (true) on anything that belongs to one user.
- 4Check the repo for these mistakes in one pass. From the project root, npx -y viberaven@1.8.0 check reports a public table without row level security as rls_disabled, a policy that lets anyone read every row as rls_policy_allows_all_read, a security definer function no migration revokes as security_definer_function_executable and a Supabase service role key in browser code as service_role_key_in_client_code. It reads the repo, not the live project, so the Security Advisor stays the check for the database:
Terminal npx -y viberaven@1.8.0 check - 5Keep the secret or service role key on the server: never behind NEXT_PUBLIC_ or VITE_, never in a "use client" file, never in a repo. Supabase says a secret key "bypasses every Row Level Security policy you have".
- 6Lock down functions and views in the public schema: revoke execute from anon and authenticated on functions only your server calls, and set security_invoker on views over protected tables.
- 7Go through Supabase's production checklist for the account and Auth settings: MFA on your Supabase account, SSL enforcement, network restrictions, email confirmations, a reasonable OTP expiry and a custom SMTP server.
- 8Test the policies: a pgTAP file per table, or at least a second account that should see none of the first account's data.
What Supabase handles and what is yours
From Supabase's shared responsibility model and its security docs.
What Supabase says it handles
Postgres backups and observability, operating system maintenance, and the infrastructure and its security. Its security page says the platform is SOC 2 Type 2 compliant and ISO 27001 certified, that DDoS attacks are handled at the edge via Cloudflare, and that fail2ban blocks IP addresses after repeated abuse such as failed authentication attempts.
What is shared
API rate limiting, Postgres security controls, upgrades, performance tuning and resource allocation.
What is yours
Your Supabase account, access management for the account, database and tables, your data, and applying security controls. Supabase sends security alerts through the Security Advisor and says "applying the recommendations are your responsibility". It also says you are responsible for managing your database secrets and API keys.
Why the defaults leave room for mistakes
Supabase says it could put many more restrictions in place, but that you would eventually find them prohibitive, so it gives you full access to the database instead. Two defaults follow from Postgres and the platform rather than from your app. Postgres creates every table with RLS off; Supabase turns it on for tables created in the dashboard, but not for tables created in SQL or migrations. And on existing projects a new table in public is granted to anon and authenticated until you revoke it, a default Supabase is changing so exposure becomes opt-in.
Related guides
Official docs behind this checklist
Browse all launch guides · Read resources · How to make and check your next change
FAQ for builders before launch
Is Supabase secure?
The platform side rests on Supabase's compliance work (SOC 2 Type 2, ISO 27001) and its infrastructure controls. Whether your app is secure on it depends on your project: row level security on every exposed table, policies that check the caller, and keys in the right place. The Security Advisor checks the database side of that for you.
Is the Supabase free plan safe for production?
Row level security is part of Postgres, so your policies work the same on any plan. Some Auth protections depend on the plan: Supabase says leaked password protection is available on the Pro Plan and above.
Does it matter that the anon key is in my frontend?
No, that is where it belongs. It only reaches what your RLS policies and grants allow. The key that must never reach the frontend is the service role or secret key.