Supabase Security Advisor warnings: what each one means and how to fix it
Last reviewed 2 December 2026
Supabase’s Security Advisor, or Lovable’s security check, has handed you a list of warnings with names like “Function Search Path Mutable”. Some can expose your customers’ data. Others are tidying up. Here’s what each common one means, and what to do about it.
Deal with the errors first. Tables without RLS, views that skip RLS and views over your user list can all leak data, and so can policies that let anyone change rows. Function search paths and extensions in the public schema have small, standard fixes. Leaked password protection is a switch in your Auth settings. Ignore a warning only when you’re sure it doesn’t apply to your app.
Rather talk it through with someone? Tell us about your app →
Where these warnings come from
Supabase’s database advisors (opens in a new tab) are built-in checks on your project. The Security Advisor is in the dashboard, and each finding has a level: ERROR, WARN or INFO.
Lovable’s automatic database check (opens in a new tab) looks for similar problems, such as “a rule that lets everyone in”. Its findings appear under More → Security, marked Critical, Warning or Info. The names differ, but the fixes below apply to both.
RLS Disabled in Public
This is the most serious one. A table your app’s API can reach has no Row Level Security (RLS), so anyone with your project’s address and public key can read, change and delete its rows. It has its own guide: how to switch RLS on without breaking your app.
RLS Enabled No Policy
What it means: RLS is on for a table, but the table has no policies. Supabase’s lint page (opens in a new tab) says “no data can be read or written through the API”. This one breaks features. It doesn’t leak data.
The fix: if the app should use the table, add policies that say who may reach which rows. Our RLS guide shows how to write them with Lovable.
Safe to leave? Yes, if only your server should use the table. Supabase suggests making that clear with a policy that always says no:
create policy "No access through the API"
on public.admin_logs
for select
using (false);
RLS Policy Always True
What it means: a policy that changes data (insert, update, delete or all) has a rule that is always true, such as using (true) or with check (true). Supabase’s summary is “Security policy allows unrestricted access”. Read-only (select) policies with using (true) aren’t flagged by this check.
The risk: RLS looks switched on, but the policy lets everyone it covers through. On an insert, update or delete policy, that means anyone with that role can add, change or delete any row.
The fix: give the policy a real condition, usually that the row belongs to the signed-in user. This is Supabase’s pattern for updates:
create policy "Users can update their own profile."
on profiles for update
to authenticated
using ((select auth.uid()) = user_id)
with check ((select auth.uid()) = user_id);
Drop the old always-true policy in the same change.
Safe to leave? A public read policy isn’t what this warning is about. Supabase’s lint page (opens in a new tab) names public read-only tables, such as blog posts or product catalogues, as cases where using (true) may be intended. A rule that lets everyone write is a different matter.
Policy Exists RLS Disabled
What it means: a table has policies, but RLS is off, so they do nothing. Supabase’s summary is “Security policy not enforced”. It happens, for example, when someone switched RLS off to clear an error.
The risk: the same as a table with no RLS. Supabase calls it “a common misconfiguration that can lead to data leaks.”
The fix: check the policies still match who should see the data, back up, then switch RLS on:
alter table public.orders
enable row level security;
Test with two accounts afterwards. If the error that made someone switch it off comes back, see fixing data that won’t load.
Security Definer View
What it means: a view is a saved query that your API can read like a table. Supabase’s RLS guide (opens in a new tab) says views “bypass RLS by default because they are usually created with the postgres user.”
The risk: a view over a protected table can show every row its policies were meant to hide. Supabase rates this one an ERROR.
The fix: make the view check the permissions of the person asking. Supabase’s views guide (opens in a new tab) shows how:
alter view public.order_summary
set (security_invoker = true);
After that, the policies on the tables behind the view apply. Test the pages that use it, because signed-in users now need access to those tables too.
Exposed Auth Users
What it means: a view your API can reach reads from auth.users, the table behind Supabase sign-in. Supabase says it holds your users’ login methods and “other personally identifiable information”. The summary is “User data exposed through a view”.
The risk: if that view skips RLS, Supabase says it “exposes all user records to all API users”. That’s your whole customer list.
The fix: replace the view with a profiles table in public that holds only what your app needs, with RLS on. Supabase’s user data guide (opens in a new tab) shows how. Supabase warns that an error in the trigger that fills it can block sign-ups, so test sign-up afterwards.
Function Search Path Mutable
What it means: a database function doesn’t fix where it looks for the tables it names. The finding reads like “Function public.handle_new_user has a role mutable search_path”.
The risk: Supabase’s summary is “Unsecured function search path”. The function could use a different table or function than intended. It matters most for security definer functions, which run with their creator’s rights. Supabase’s functions guide (opens in a new tab) says that when you use security definer, “you must set the search_path”.
The fix: set the search path to empty, as Supabase recommends, and name the schema for every table:
create or replace function public.example_function()
returns void
language sql
set search_path = ''
as $$
-- same body, with every table
-- written as public.table_name
$$;
Test what the function does afterwards. Any table name inside it without public. in front will now fail.
Extension in Public
What it means: a database extension was installed in the public schema, so its functions and tables show up in your app’s API.
The risk: lower than the others. Supabase says it clutters your API, “potentially exposing unintended functionality”.
The fix: move it to the extensions schema. This is Supabase’s example:
alter extension ltree
set schema extensions;
Code that calls the extension’s functions with public. in front will need updating, so try it on a copy first.
Leaked password protection is off
What it means: new passwords aren’t checked against passwords known to have leaked. Supabase can reject those using the Have I Been Pwned service. Lovable’s check flags it as leaked-password protection being off. The Auth warnings in Supabase’s dashboard aren’t in its published lint list, so their exact wording may differ.
The risk: Supabase says attackers use lists of leaked passwords “to automate sign-in attempts (known as credential stuffing)”.
The fix: on Lovable’s built-in backend, switch on Password HIBP check under More → Users → Settings → Email. Lovable says it’s on by default for new projects. On your own Supabase project, it’s in the Email provider’s Auth settings.
Safe to leave? Only where you can’t switch it on. Supabase’s password guide (opens in a new tab) says leaked password protection “is available on the Pro Plan and above”. On the Free Plan, set a minimum length of at least 8 characters and require digits, lower and uppercase letters and symbols, as that guide suggests.
Multi-factor sign-in (MFA)
Two things get mixed up here. Your own Supabase account should have MFA whatever your app does: Supabase’s production checklist (opens in a new tab) says to protect it, and to enforce MFA across your organisation on Pro, Team or Enterprise plans.
MFA for your app’s users is a choice. Supabase Auth supports authenticator apps and phone codes, and its checklist says to set it up “if your application needs a higher level of security”. For admin tools, or apps holding health or financial data, we’d switch it on.
Ignoring a warning safely
Supabase says “Some findings may be intentional, so check them against your intended schema and access model before you change anything.” You can turn off Security Advisor rules that don’t apply to your project. In Lovable, choose Ignore finding and give a reason. Lovable’s advice: “Ignore a finding only when you’re sure it doesn’t apply.”
A prompt to paste into Lovable
On Lovable’s built-in backend you change the database through the chat. Choose Plan first, so nothing changes until you approve it:
The security check shows: [paste the warning and the table, view or function it names]. Don’t change anything yet. Tell me: 1. What this warning means for this project. 2. Which pages and functions use what it names. 3. The single migration you would write to fix it. 4. How I can test that nothing else breaks. Don’t switch RLS off, don’t add policies that let everyone in, and don’t use the secret key in frontend code.
When to get help
Get a second pair of eyes if a live app with real customers has ERROR findings, if one fix keeps breaking something else, or if you can’t tell whether a warning applies. For the wider picture, read whether Lovable apps are secure and our security checklist for AI-built apps. When we review and fix AI-built apps, we start with a written audit of every finding, so you know what matters before anything changes.
Questions founders ask
Do I have to fix every Security Advisor warning?
No. Fix every ERROR, and any warning that lets people read or change data they shouldn’t. Supabase says some findings may be intentional, such as a server-only table with RLS on and no policies. Check each one before you dismiss it.
Why can’t I turn on leaked password protection?
On your own Supabase project, Supabase offers it on the Pro Plan and above. On Lovable’s built-in backend, it’s the Password HIBP check under More → Users → Settings → Email.
Will fixing these warnings break my app?
It can. Switching a view to security_invoker or emptying a function’s search path changes what they can reach. Back up, make one change at a time, and test the pages that use it.