Bolt RLS Policy Always True warning: what it means and how to fix it
Short answer: Bolt shows RLS Policy Always True when a row level security policy on one of your tables has an unconditional clause like using (true) or with check (true), so that clause does not limit which rows the roles it names (often every visitor) can add, change or delete. Actual access also depends on the policy's command, grants and the other policies on the table. Decide what each table needs (view only, submit only, or private to its owner), drop the open policy by name, add one scoped policy per command, then test signed out and as a second user. SniffPup, a free passive security scanner for vibe-coded apps, can then run a free SniffPup scan of your own site to see what visitors can reach.
Passive, read-only checks only, for a live URL you own or are authorized to test. SniffPup does not read your RLS policies; this is not a source, RLS, or security audit. A score of 100 means no issues were found in our checks, not proof of security. Full fixes free for every critical issue (no critical? one other fix is free).
Home › Guides › Bolt RLS Policy Always True · Last updated · By Ember, SniffPup
What does RLS Policy Always True mean?
Bolt's database Security page (titled Security Audit, on all plans) uses the same database checks as the Security Advisor in Supabase. This warning comes from the Supabase check rls_policy_always_true, listed in Supabase's advisor docs as lint 0024 at level WARN. RLS is on, but one of the policy's clauses has no condition that limits which rows it allows.
The lint's source is narrower than its name. It looks only at permissive policies for anon, authenticated or every role (PUBLIC, named explicitly or used by default when TO is left out), on tables with RLS on, and flags a policy when:
- an
UPDATE,DELETEorALLpolicy hasusing (true)(or1=1), or noUSINGat all; - the
WITH CHECKistrue(or1=1), or anINSERTpolicy has noWITH CHECK.
It skips select ... using (true) on purpose, because public reads are often deliberate. So a quiet Security page does not mean your data is private. Bolt's docs also say that if you haven't asked Bolt to add sign-in, it might write policies that let any visitor view, add, change and delete your data, and that the warning is acceptable only if you're comfortable with every visitor being able to change or delete it.
A typical policy that triggers it:
create policy "Allow all" on public.posts for all using (true) with check (true);
How do I list the open policies?
If your Bolt app uses your own Supabase project, run this in the Supabase SQL Editor. It lists permissive policies in public whose condition is literally true, plus insert policies with no check, and it includes the read policies the warning skips. It matches the literal text only, so also read any policy written as 1=1 or with no condition:
select tablename, policyname, cmd, roles, qual, with_check
from pg_policies
where schemaname = 'public'
and permissive = 'PERMISSIVE'
and (qual = 'true' or with_check = 'true'
or (cmd = 'INSERT' and with_check is null))
order by tablename, cmd;On Bolt's own database, ask Bolt in the chat to list the policies instead (prompt below). roles of {public} means the policy applies to all roles, including anon. PUBLIC is the default when TO is left out, and it can also be named explicitly.
How do I fix it? Pick one option per table
Bolt's docs offer three options. Use the real policy names from the query, drop the open policy, and create one policy per command. Supabase's RLS guide recommends always naming the role with to and wrapping auth.uid() in select.
Visitors can only view the data (portfolio, menu, blog posts)
drop policy "Allow all" on public.posts; create policy "Anyone can read posts" on public.posts for select to anon, authenticated using (true); -- no insert, update or delete policy: visitors can't change posts
This read policy will not trigger the warning. Only use it on tables where every column is meant to be public.
Visitors can submit information (contact form, sign-ups, reviews)
drop policy "Allow all" on public.contact_messages; create policy "Visitors can send a message" on public.contact_messages for insert to anon, authenticated with check (true); -- no select, update or delete policy: visitors can't read or change what others sent
This insert policy is intentional, and the Security page will keep listing it: the lint flags any always-true with check. Supabase's advisor docs say some findings may be intentional, so note why it is there. Without a select policy, an insert that asks for the row back (.insert(...).select() in supabase-js) fails, because Postgres applies select policies to RETURNING (CREATE POLICY docs). Insert without .select(). A 42501 error can mean a missing grant or a policy rejection, so read the full message and check both: Supabase 42501 permission denied.
The data stays private (orders, messages, profiles)
Add sign-in first, and give the table an owner column such as user_id uuid references auth.users. Then tie every command to the signed-in owner:
drop policy "Allow all" on public.orders; create policy "Owners read their orders" on public.orders for select to authenticated using ((select auth.uid()) = user_id); create policy "Owners add their orders" on public.orders for insert to authenticated with check ((select auth.uid()) = user_id); create policy "Owners update their orders" on public.orders for update to authenticated using ((select auth.uid()) = user_id) with check ((select auth.uid()) = user_id); create policy "Owners delete their orders" on public.orders for delete to authenticated using ((select auth.uid()) = user_id);
The update policy writes both clauses: using checks the existing owner, and with check checks the row it becomes, so a user can't hand a row to someone else (if with check is left out, Postgres reuses using). “Only signed-in people” is not private on its own: an update, delete or all policy with to authenticated using (true) does not restrict which existing rows any account can touch through that clause; only grants, other policies and, for updates, with check stand in the way. Keep RLS on, check that each role's table grants match what it should do, and review every policy on the table, not only the ones the query above returns, so no other policy grants access you don't want.
Paste this into Bolt
List every RLS policy in my database as a table: table, policy name, command, roles, USING and WITH CHECK. Then change them so: - posts: visitors can only view rows. - contact_messages: visitors can only add rows, and cannot read, change or delete rows. - orders: only the signed-in owner (user_id = auth.uid()) can view, add, change or delete their own rows. Drop each old always-true policy by name instead of adding new policies next to it. Put the change in a migration.
Swap in your own table names and the option each one needs.
How do I check the fix worked?
Open Bolt's Security page again; Bolt's docs say to re-check it any time you update your database. Then test as the roles your app uses. A query run as postgres bypasses RLS (check with select current_user;), so switch role inside transactions you roll back. Run each check in its own transaction, because an error ends the rest of the transaction:
begin; set local role anon; select count(*) from public.orders; -- expect 0 (or a 42501 error if anon has no grant) rollback; begin; set local role anon; update public.orders set user_id = user_id; -- expect UPDATE 0 (or a 42501 error if anon has no grant) rollback;
Then sign in as a second test user and try to read, change and delete the first user's rows through the app's API, not just the screens. More patterns: Supabase RLS policy examples and why a leftover using (true) policy still wins.
What should I do?
1. Read the warning detail on Bolt's Security page
In your Bolt project, click the database icon at the top center, then Security. Each RLS Policy Always True entry names the table, the policy and the command (INSERT, UPDATE, DELETE or ALL), and says whether the USING clause, the WITH CHECK clause, or both are always true.
2. List the open policies, including reads
Run the pg_policies query below in the Supabase SQL Editor if your Bolt app uses your own Supabase project, or ask Bolt in the chat to list every policy with its table, command, roles, USING and WITH CHECK. Include SELECT policies: the warning skips them, but a using (true) read on personal data is a leak.
3. Decide what visitors may do on each table
Bolt's docs give three options: visitors can only view the data (a portfolio, menu or blog posts), visitors can submit information (contact forms, sign-ups, reviews) but not read, change or delete what others sent, or the data stays private (orders, messages), which needs sign-in and an owner check.
4. Replace the open policy instead of adding another
Drop the always-true policy by name and create one policy per command that matches the option you picked. Adding another permissive policy next to an open one never takes access away, because permissive policies for the same command are combined with OR. Keep RLS on, make sure table grants match what each role should do, review every policy on the table (not only the ones the literal query returns) so none grants access you don't want, and put the change in a migration.
5. Re-run the Security page and test as the roles your app uses
Open Bolt's Security page again. Then test signed out with your public key and as a second signed-in user. A query run as postgres bypasses RLS, so check which role you are using before you treat a SQL result as a visitor test.
6. Optionally scan the live URL you own
A free SniffPup scan is passive and read-only on a live URL you own or are authorized to test. It checks what the published site gives any visitor and whether a signed-out visitor can read rows in up to 8 Supabase tables. It does not read RLS policies or test writes, so it cannot confirm this warning is fixed.
Next: Is my Bolt app secure?, Bolt security audit, step by step, Leftover using (true) policy, Supabase RLS policy examples, and Supabase security audit.
FAQ
What does the RLS Policy Always True warning mean in Bolt?
A row level security policy on one of your tables has a clause that is always true, so that clause does not limit which rows the roles it names can add, change or delete. What a request can actually do also depends on the policy's command and other clause, table grants and the other policies on the table. Bolt's Security tab uses the same checks as Supabase's Security Advisor, where this check is called rls_policy_always_true (lint 0024, level WARN). It flags permissive policies for anon, authenticated or every role (PUBLIC, named or used by default when TO is left out) on tables with RLS on, when an INSERT, UPDATE, DELETE or ALL policy uses true (or 1=1), or an INSERT policy has no WITH CHECK at all.
Why does Bolt flag it when I want my site to be public?
Bolt's docs say that if you haven't asked it to add sign-in, it might write policies that let any visitor view, add, change and delete your data, and that it runs the same scan on every project, so it flags this even when public access is what you want. Bolt calls the warning acceptable only if you're comfortable with every visitor being able to change or delete that data. Choose the least access your public site needs, such as read only or submit only.
Does a select policy with using (true) trigger the warning?
No. The lint's own description says SELECT policies with USING (true) are left out on purpose, because public read access is often deliberate. That is fine for a menu or blog posts. It is a leak on a table with personal data, and this lint does not flag that select policy, so check read policies yourself with the pg_policies query in this guide.
I added sign-in. Why is the warning still there?
Two common reasons. A policy like for update to authenticated using (true) is still always true: that clause does not restrict which existing rows any signed-in account can change (only grants, other policies and with check do), and if sign-ups are open, anyone can create an account. And the old open policy may still be on the table: Postgres combines permissive policies for the same command with OR, so adding another permissive owner policy next to an old true one does not narrow access. Drop the open policy by name and compare the row's owner column to (select auth.uid()).
Is it safe to click Ask Bolt to fix?
It is the button Bolt provides on the Security page when it finds an issue and you can edit the project. Tell Bolt which access each table needs (view only, submit only, or private to its owner), then read the policies it writes and open the Security page again. If a fix adds another permissive owner policy for the same command next to the old always-true one, it does not narrow the access the old policy allows.
Can a SniffPup scan find this warning?
No. The free SniffPup scan is passive and read-only on a live URL you own or are authorized to test. It reads what your published site gives any visitor, such as keys in your JavaScript and public files, and it checks whether a signed-out visitor can read rows in up to 8 Supabase tables without downloading them. It does not read your RLS policies and never tests writes, so it cannot confirm this warning is fixed. It is not a source, RLS, or security audit.
Sources: Bolt: Database security settings (Security page, same checks as Supabase Security Advisor, RLS Policy Always True on sites without sign-in, the three access options, Ask Bolt to fix), Supabase: Advisors (lint 0024; some findings may be intentional), Supabase splinter: rls_policy_always_true lint (what is and isn't flagged), Supabase: Row Level Security (name the role, (select auth.uid()), insert and update policies, service role bypasses RLS) and PostgreSQL: CREATE POLICY (permissive policies combined with OR, select policies on RETURNING), checked November 12, 2026. SniffPup facts are from our scanner page.