Supabase Security Advisor warnings: which ones matter and how to fix them
By Abbi Labs · Last updated 20 November 2026
Scan your app free — see what a signed-out stranger can actually read, not just what the Advisor guesses.
Abbi Labs checks your live site from the outside: Supabase tables readable with your public key, role-looking columns exposed to the anon role, secret keys in the JavaScript, exposed .env and .git files, security headers, CORS, cookie flags and TLS certificate expiry. Read-only. No sign-up for the quick check. Source maps need a verified full scan.
No app handy?
No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.
Run on every deploy or use from Cursor / Claude Code via MCP →
Weekly AI-app security checklist
One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.
You open the Supabase dashboard and the Security Advisor has a red number on it. Maybe Lovable or Bolt created the tables, maybe Cursor wrote the migrations, and now there's a list of lint names like rls_disabled_in_public and function_search_path_mutable that nobody explained. Some of these mean your data is open to anyone right now. Some are hardening tips you can do later. This page sorts them.
Lint names, levels and fixes below are from Supabase's Advisors docs, checked 20 November 2026. You can run the same checks from Studio (Advisors, Security Advisor), the CLI with supabase db advisors, or the Supabase MCP get_advisors tool.
Fix first: the ones that leak data today
If you see any of these, stop and fix before anything else. Each one means rows are reachable with the public (anon) key that ships in your site's JavaScript.
- 0013 RLS disabled in public. Supabase's docs put it plainly: anyone with your project URL can create, read, update and delete rows in that table. Turn RLS on, then add policies, because with RLS on and no policies the app loses access too:
alter table public.notes enable row level security; create policy "own rows" on public.notes for all to authenticated using ((select auth.uid()) = user_id) with check ((select auth.uid()) = user_id); - 0023 Sensitive columns exposed. The same RLS-off problem, flagged louder because column names look like passwords, emails, API keys or card numbers. Same fix. If it really is a password or API key column, it shouldn't be in a public table at all.
- 0002 auth.users exposed. A view in
publicselects fromauth.users. Views are security definer by default in Postgres, so it hands out every user's email to the API. Drop it and use aprofilestable filled by a trigger onauth.users. Supabase's docs warn that trigger errors can block sign-ups, so test it. - 0010 Security definer view. Any public view that ignores the RLS on its tables. Full walkthrough in our security definer view guide; the short fix on Postgres 15+ is
alter view public.my_view set (security_invoker = on); - 0015 RLS references user_metadata. A policy like
auth.jwt() -> 'user_metadata' ->> 'role' = 'admin'. Any signed-in user can runupdateUser({ data: { role: 'admin' } })and pass it. See user roles and is_admin for safer places to keep roles.
Fix this week: open policies and callable functions
- 0024 Permissive RLS policy. RLS is on, but a policy says
using (true)orwith check (true). AI builders write these to make an error go away. On a public catalog that's fine for select. On anything users own, scope it toauth.uid(). More in WITH CHECK (true). - 0028 / 0029 Security definer function executable. A function that runs with its owner's rights (and so skips RLS) is callable at
/rest/v1/rpc/by anon or any signed-in user. Supabase's docs note Postgres grants execute to PUBLIC by default, so revoking from anon alone isn't enough:
Details in RPC functions callable by anon.revoke execute on function public.delete_user(uuid) from public, anon, authenticated; grant execute on function public.delete_user(uuid) to service_role; - 0031 / 0032 Dynamic SQL function executable. A function that runs
EXECUTEon a string the caller passes in, like anexec_sql(query text)helper an agent created. Callable by anon, that's the whole database. Revoke execute or drop it. - 0025 Public bucket allows listing. Public bucket files are readable by URL anyway. A broad select policy on
storage.objectsadditionally lets anyone list every file name. See storage bucket public? - 0026 / 0027 pg_graphql table exposed. Tables visible in the GraphQL schema to anon or signed-in users. If the app doesn't use GraphQL, Supabase's docs suggest disabling the
pg_graphqlextension.
Hardening: fix when you have ten minutes
- 0011 Function search path mutable. The function inherits whoever-called-it's
search_path. Pin it and use full names:
Without full names the function will fail after this change, which is how you find the ones that relied on it.alter function public.handle_new_user() set search_path = ''; -- then inside the function body: insert into public.profiles ... - 0014 Extension in public. Move extensions to their own schema (
create schema extensions; alter extension pg_trgm set schema extensions;). - 0012 Anonymous sign-ins enabled. Only matters if you didn't mean to turn it on. Anonymous users still get the
authenticatedrole, so any policy that only checks "signed in" lets them in. - 0007 / 0008. 0007 means you wrote policies but forgot to enable RLS (fix it, it's really a 0013). 0008 means RLS is on with no policies, which blocks API access and is usually fine.
All of them on one screen
| Lint | Level | What it means | Fix |
|---|---|---|---|
| 0013 RLS disabled in public | ERROR | Anyone with your project URL and public key can read, insert, update and delete every row. | alter table public.your_table enable row level security; then add owner-scoped policies. |
| 0023 Sensitive columns exposed | ERROR | Same as 0013, on a table whose column names look like passwords, emails, phone numbers, tokens or card data. | Enable RLS now. Move secrets out of public tables. |
| 0002 auth.users exposed | ERROR | A view in public selects from auth.users, so user emails and sign-in details are readable through the API. | Drop the view. Use a public.profiles table filled by a trigger, with its own RLS. |
| 0010 Security definer view | ERROR | The view runs with its owner's rights and ignores RLS on the tables underneath. | alter view public.v set (security_invoker = on); (Postgres 15+) or revoke select from anon, authenticated. |
| 0015 RLS references user_metadata | ERROR | Users can edit their own user_metadata, so a policy that checks it for a role can be bypassed. | Read roles from app_metadata, a roles table users can't write, or a custom access token hook claim. |
| 0024 Permissive RLS policy | WARN | A policy like using (true) or with check (true) lets every role it applies to read or write every row. | Scope it: using ((select auth.uid()) = user_id). |
| 0028 Anon security definer function executable | WARN | A SECURITY DEFINER function bypasses RLS and anon can call it at /rest/v1/rpc/name. | revoke execute on function public.fn from public, anon; and check auth.uid() inside it. |
| 0025 Public bucket allows listing | WARN | A broad select policy on storage.objects lets anyone list every file in a public bucket. | Drop the broad policy. Public URLs still work without it. |
| 0011 Function search path mutable | WARN | The function resolves unqualified names using the caller's search_path. | alter function public.fn() set search_path = ''; and fully qualify names. |
| 0012 Anonymous sign-ins enabled | INFO | Anonymous users get the authenticated role, so 'authenticated' policies cover them too. | Fine if intended. Check policies with auth.jwt()->>'is_anonymous'. |
| 0007 Policy exists, RLS disabled | INFO | You wrote policies but they do nothing because RLS is off. | alter table public.your_table enable row level security; |
| 0008 RLS enabled, no policy | INFO | Nothing can read or write the table through the API. | Usually fine. Add a policy only if the app needs access. |
What a green Security Advisor still misses
The Advisor reads your database settings and matches known bad patterns. It's worth running after every migration, but a clean result doesn't mean the app is safe:
- Policies that are wrong but not "always true".
using (auth.role() = 'authenticated')on a table of private messages isn't flagged. With open sign-ups, anyone can create an account and read everything. Test as a second user, as in testing RLS as a real user. - Columns users shouldn't change. An own-row update policy on
profilespasses the Advisor while letting users set their ownplanorcredits. See restricting update columns. - Anything outside the database. A
service_rolekey or OpenAI key in your JavaScript bundle, an exposed.env, public source maps, missing security headers. The Advisor can't see your frontend.
A prompt for Lovable, Bolt or Cursor
Run the Supabase security advisors for this project (get_advisors with type security, or supabase db advisors). For every ERROR and WARN, show the table, view or function, explain in one line who can read or write what today, and write a migration that fixes it with owner-scoped policies using (select auth.uid()). Don't use using (true) or with check (true) on user-owned tables, don't read roles from user_metadata, revoke execute from public and anon on security definer functions, and set search_path = '' on functions with fully qualified names. Show me the SQL before running it.Read the SQL before you accept it. Agents sometimes "fix" an RLS error by adding a using (true) policy, which turns an ERROR into a WARN without closing anything.
What Abbi Labs checks
Abbi Labs looks from the outside and never writes to your database. The free scan uses your site's own public key to report which Supabase tables a stranger can read, which is the real-world result of 0013, 0023 and an over-open 0024, plus keys in your JavaScript, exposed .env and .git files, security headers, CORS, cookie flags and TLS expiry. The free Supabase policy checker runs in your browser on a pasted, metadata-only query result and flags RLS off on granted tables, always-true policies, anon write grants, and user-owned tables whose policies never check auth.uid(). Neither replaces the Advisor; it doesn't read your functions' search paths or extensions.
FAQ
Which Supabase Security Advisor warnings should I fix first?
The ERROR-level ones that make data reachable with your public key: 0013 RLS disabled in public, 0023 sensitive columns exposed, 0002 auth.users exposed through a view, 0010 security definer view and 0015 policies that read user_metadata. Then the WARN-level ones about always-true policies (0024) and SECURITY DEFINER functions callable by anon (0028).
Is 'Function Search Path Mutable' dangerous?
It's a hardening warning, not a data leak by itself. Supabase's docs say a function without a fixed search_path inherits the caller's, which can make it behave differently or resolve names to objects the caller controls. The fix is cheap: add set search_path = '' to the function and fully qualify table names like public.profiles.
Does a clean Security Advisor mean my app is secure?
No. The Advisor checks your database config against a fixed list of patterns. A policy like using (auth.role() = 'authenticated') on a table of private data passes, even though with open sign-ups that means anyone with an email address. It also doesn't see your frontend, so it won't notice a service_role or OpenAI key in your JavaScript, an exposed .env file or missing security headers.
Can I ignore 'RLS Enabled No Policy'?
Usually yes. It's INFO level. Supabase's docs say a table with RLS on and no policies can't be read or written through the API at all, which is the safe direction. Leave it if only your server (service role) touches that table.
Does Supabase email me about these?
Supabase surfaces Advisor findings in the dashboard and you can run them from the CLI (supabase db advisors) or through the MCP get_advisors tool. Don't rely on noticing the dashboard badge. Check after every schema change your AI builder makes.
What does Abbi Labs add on top of the Advisor?
The outside view. The free scan reads your live site the way a stranger would and reports Supabase tables your public key can actually read, keys in your JavaScript, exposed .env/.git files, security headers, CORS, cookie flags and TLS expiry. The free policy checker reads your policies in the browser and flags open policies the Advisor's patterns can miss, like policies on user-owned tables that never check auth.uid().