Group
  • Security

    Audit my database's public access rules

    Checks Supabase row-level security, Firebase rules, and client-exposed databases for tables anyone can read or write.

    • Improve quality
    • Debug & fix
    • Intermediate
    • Lovable
    • Bolt
    • Replit
    • General

Free Prompt

Audit the access rules on my client-facing database (Supabase row-level security, Firebase Realtime Database / Firestore rules, or any database my frontend talks to directly with a public key). For Supabase: verify RLS is enabled on every table (not just the ones with policies), and that policies enforce per-user ownership for reads and writes, since enabling RLS with no policies blocks everything but a single permissive policy (USING true) is the same as no RLS. For Firebase: read the actual rules file and test the cases it claims to handle. In both cases, enumerate every table or collection and classify it: public read, per-user, admin-only, or server-only. Server-only data must not be reachable with the public anon key at all. Pay attention to write rules, not just reads; public write access is how databases fill with garbage and how users overwrite each other's rows. Do not tighten rules blindly and break the app; test each legitimate client operation against the new rules as you go. Do not move data models around. Deliver a table-by-table access report with the fixes applied, plus a verification per table using the anon key: an unauthenticated request and a wrong-user request, both refused where they should be.

What This Does / How This Helps

Goes through your Supabase or Firebase access rules table by table and closes the ones that let the public read or write things they shouldn't. This is the single most common critical finding in Lovable and Bolt apps. The frontend talks to the database directly with a public key, and the rules that decide who can do what were never written, so the entire database is open to anyone who opens dev tools and reads the key. Open reads leak every user's data; open writes let anyone vandalize everything. The report gives you a per-table classification and fixes, verified with the same anon key an attacker would use.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts