VibeCPR

← All fixes

Bolt · Supabase · RLS

Triage Bolt's "RLS Policy Always True" warning: when it's fine and how to fix it

Updated · Applies to: Bolt, Supabase

TL;DR fix: "RLS Policy Always True" means a policy has no condition that limits rows: USING (true) or WITH CHECK (true). RLS is technically enabled, but for that operation every role the policy names can touch every row. Bolt says it may write these policies when your site has no sign-in, and that it flags them on every project even when public access is intended. Triage each flagged table into one of three buckets from Bolt's docs: visitors can only view (keep a read-only SELECT policy), visitors can submit (INSERT only, no reads), or private (add sign-in and scope policies to auth.uid()). Any always-true UPDATE or DELETE on a public site means any visitor can change or wipe the table.

Steps

  1. Open the Security Audit and list the flagged policies. In Bolt, open your database settings and the Security page (titled Security Audit). Bolt says it uses the same checks as Supabase's Security Advisor. Note each table and policy flagged RLS Policy Always True.
  2. See what each policy really allows. Run the pg_policies query below (Supabase SQL editor if you use your own Supabase project). Look at cmd (SELECT, INSERT, UPDATE, DELETE, ALL), roles and the qual / with_check columns. A 'true' there means no restriction.
  3. Put each table in a bucket: view-only, submit-only or private. Portfolio, menu, blog posts: visitors view only. Contact form, waitlist, reviews: visitors submit only. Orders, messages, anything personal: private, which needs sign-in.
  4. Remove always-true write policies first. An always-true UPDATE, DELETE or ALL policy for anon on a site without sign-in lets any visitor change or delete every row. Drop those before anything else.
  5. Apply the bucket's policies, via Bolt or SQL. Ask Bolt to update the policies (sample prompt below), or run the SQL yourself. Then reopen the Security page; Bolt's docs say to check it again after any database change.
  6. Retest logged out. From a private window, try to read the submit-only and private tables and to update or delete a row. All of those should fail or return nothing.

What Bolt is telling you

Bolt’s Security Audit runs the same database checks as Supabase’s Security Advisor. “RLS Policy Always True” is Supabase’s lint 0024: a policy whose USING or WITH CHECK is true (or a tautology like 1=1). Supabase’s description of the impact, per operation:

  • SELECT: any user with that role can read all rows
  • INSERT: any user can insert any data
  • UPDATE: any user can modify any row
  • DELETE: any user can delete any row

Bolt’s docs explain why you’re seeing it: if you haven’t asked Bolt to add sign-in, it “might write policies that allow any visitor to view, add, change, and delete the data in your database.” Bolt flags these on every project, even when public access is intended, so the warning needs triage, not panic.

Step 1: list what’s actually allowed

select tablename, policyname, cmd, roles, qual, with_check
from pg_policies
where schemaname = 'public'
order by tablename, cmd;

Rows where qual or with_check is true are your always-true policies. cmd = ALL covers every operation. roles = {public} means the policy has no TO clause and applies to every role, including anon.

Step 2: put each table in a bucket

These are the three options from Bolt’s own docs:

BucketExamplesanon can
Visitors can only viewportfolio, menu, blog postsSELECT only
Visitors can submitcontact form, sign-ups, reviewsINSERT only
Privateorders, messages, profilesnothing; add sign-in

Step 3: the SQL for each bucket

Replace the table and policy names with what Step 1 showed.

View-only (public content):

drop policy if exists "Allow all" on public.posts;          -- the always-true ALL policy
create policy "Anyone can read posts"
on public.posts for select
to anon, authenticated
using (true);                                                 -- intentional, read-only

This SELECT will likely still be flagged. That’s expected for genuinely public content. What matters is that there’s no always-true INSERT, UPDATE or DELETE.

Submit-only (contact form):

drop policy if exists "Allow all" on public.contact_messages;
create policy "Anyone can submit a message"
on public.contact_messages for insert
to anon, authenticated
with check (true);
-- No SELECT / UPDATE / DELETE policy for anon: visitors can't read others' submissions.

Read submissions from the Supabase dashboard or server code with a secret key, never from the browser.

Private (needs sign-in first):

drop policy if exists "Allow all" on public.orders;
create policy "Users read own orders"
on public.orders for select to authenticated
using ( (select auth.uid()) = user_id );
create policy "Users create own orders"
on public.orders for insert to authenticated
with check ( (select auth.uid()) = user_id );

Without sign-in there’s no auth.uid() to check, which is why Bolt’s docs say private data needs sign-in added to the site.

Or ask Bolt

Bolt’s docs give this example prompt:

Update the policies for my database so visitors can only view the posts table, and can only add rows to the contact_messages table.

A fuller version for a mixed app:

Review every RLS policy flagged "RLS Policy Always True". For each table:
- public content (posts, menu): SELECT only for visitors, no insert/update/delete
- form tables (contact_messages, waitlist): INSERT only for visitors, no select/update/delete
- private tables (orders, messages, profiles): add sign-in and scope every policy
  to (select auth.uid()) = user_id
Never use USING (true) on UPDATE or DELETE. Show me the final policy list.

Then reopen the Security page and retest from a logged-out private window.

For the general Supabase version of this problem (including the November 2026 Lovable scan figures and a two-minute check), see fix USING (true) policies that make a table publicly readable. On Lovable, the same kind of policy shows up as a security finding in the Publish dialog: see Lovable won’t publish because of security findings. RLS can also be skipped by views and SECURITY DEFINER functions.

When to get help

Get help if you're not sure which tables hold personal data, if adding sign-in breaks your app, or if Bolt keeps regenerating always-true policies.

FAQ

What does "RLS Policy Always True" mean in Bolt?

Bolt's docs say it means a policy has no conditions that limit who can access a row. In Supabase's Advisors this is lint 0024 (permissive RLS policy): always-true expressions like USING (true) or WITH CHECK (true) "effectively bypass the security that RLS is meant to provide".

RLS is enabled. How is the table still public?

RLS decides which rows a request can touch by running your policies. A policy of USING (true) allows every row, so enabling RLS changes nothing for that operation. Anyone with your site's public key, which ships in the browser, can call the database directly without going through your pages.

Can I ignore the warning?

Sometimes. Bolt says it flags this on every project, even when public access is what you want, and that it's acceptable only if you're comfortable with every visitor being able to do what the policy allows. A read-only SELECT on genuinely public content is a reasonable thing to keep. Always-true UPDATE or DELETE on a public site almost never is. Supabase also lists public read-only tables like blog posts and product catalogs as false positives.

What about a contact form? Visitors have to insert.

Keep an INSERT policy for anon and give anon no SELECT, UPDATE or DELETE policy. Bolt's docs describe this as visitors can add data but not read, change or delete what other people submitted. The insert policy may still be flagged; that one can be intentional.

Is "to authenticated using (true)" safe?

Only if every signed-in user should see every row. If anyone can sign up, that is close to public. For private data use a condition like (select auth.uid()) = user_id.

Sources

Related fixes