r/Supabase • • 11h ago

tips Quick way I audit Supabase RLS leaks using only HEAD + Prefer: count=exact

2 Upvotes

When I review Supabase projects built quickly with Lovable or Bolt, the most common leak is forgetting to enable RLS on a table or leaving a broad SELECT policy for anon.

Instead of pulling actual rows from someone's database during a quick check, you can send a HEAD request to /rest/v1/<table> with the public anon key and Prefer: count=exact. PostgREST returns the exposed row count inside the Content-Range header (for example */142) with an empty response body, so you immediately know whether unauthenticated reads are open without downloading user data.

I wrapped that check together with OpenAPI table discovery, rpc/ probing, and public storage bucket checks into a small open-source CLI (npx supabase-rls-check) and a browser checker. Attached is a sample audit output showing exposed tables and generated ALTER TABLE ... ENABLE ROW LEVEL SECURITY fixes.

Source is on GitHub if you want to run it locally in CI: https://github.com/Tthanh2k6/supabase-rls-check

Curious if anyone here also checks anything else automatically on anon before shipping, like auth.users views or SECURITY DEFINER RPCs?


r/Supabase • • 11h ago

auth Blocking disposable emails and Gmail alias farming in the Before-User-Created hook

1 Upvotes

Built a tiny API that blocks disposable emails and Gmail alias farming (j.o.h.n+7@gmail) right in Supabase's Before-User-Created hook. One call, 1,000 free checks a month, no card. Looking for 10 people running free tiers who'll try it and tell me what it misses. Snippet in comments.


r/Supabase • • 5h ago

tips My project is running out of Disk IO Budget

Post image
0 Upvotes

I created a Chrome extension that already has 289 users, 190 of them active weekly, with about 15k total requests per day (low numbers).

Apparently, the RAM is maxed out, and Supabase is asking me to upgrade to the next plan ($25 USD).

I don't want to, because the platform is small and I'm not monetizing it. I've tried many things, but nothing has worked.

Has anyone else had the same issue, or does anyone have any advice?

Platform is: Lexigo