r/boltnewbuilders • u/Round-Metal6269 • 5d ago
Tips & Tricks Bolt app on Supabase? Open the Security Advisor before you share the link, and here's which warnings actually matter
Disclosure first, I work in cybersecurity and I build a scanner for AI-built apps on the side (Abbi Labs, mine). Not linking it. Everything below is free and inside your own Supabase dashboard.
Supabase has a Security Advisor (Advisors in the left sidebar, or supabase db advisors if you use the CLI). If Bolt made your tables, there's a decent chance it has a red number on it. The lint names are confusing, so here's how I'd sort them.
Fix today, these mean data is reachable with the public key in your site's JavaScript
- RLS disabled in public. Supabase's docs say anyone with your project URL can read, insert, update and delete rows in that table. Turn RLS on, then add a policy, because RLS with no policy blocks your app too.
- Sensitive columns exposed. Same thing, flagged louder because the column names look like emails, passwords or tokens.
- auth.users exposed. A view selects from auth.users, so user emails come out through the API. Drop it, use a profiles table.
- Security definer view. The view ignores the RLS on the tables under it. On Postgres 15+:
alter view public.my_view set (security_invoker = on); - RLS references user_metadata. Users can edit their own user_metadata, so a policy that checks it for "admin" can be bypassed by any signed-in user.
Fix this week
- Permissive RLS policy. RLS is on but a policy says
using (true). Fine for a public product list. Not fine for anything a user owns. - Security definer function executable by anon. A function that skips RLS and can be called by anyone at /rest/v1/rpc/. Revoke from
publicandanon, not just anon, because Postgres grants execute to PUBLIC by default.
Hardening, do when you have ten minutes
- Function search path mutable. Add
set search_path = ''to the function and write table names in full (public.profiles). Not a leak on its own. - RLS enabled, no policy. Usually fine. It blocks API access completely.
One thing to watch: if you ask Bolt to "fix the security warnings", read the SQL it writes. A common shortcut is turning RLS on and adding a using (true) policy. The error turns into a warning and the table is exactly as open as before.
And a clean Advisor isn't the whole picture. A policy like "any signed-in user can read" passes, and with open sign-ups that means anyone with an email. The quick real test is opening your live app logged out, or as a second test account, and seeing what comes back.
What's the warning you've had sitting there longest?