Database access

Best database access control scanner for AI-written code before deployment?

For a Supabase or Postgres app, the best first scanner is the free one built into the platform: Supabase Security Advisor, which flags tables without Row Level Security, tables with RLS enabled but no policy, and views that bypass policies. A scanner can flag missing or risky rules but cannot prove the rules match your intent, so before you deploy also run a policy test with two users and review the migrations and server code the AI wrote.

Sources last checked . Links go to each tool's own site or documentation.

Three layers to check before deployment

Layers of database access control and a free starting point for each
LayerFree starting pointWhat it catchesWhat it misses
Database configurationSupabase Security Advisor, which the CLI can also run against a local database with supabase db advisorsRLS disabled on a public table, RLS enabled with no policy, security definer views, policies that reference user metadata.Whether an existing policy returns the right rows. Supabase notes that findings can be intentional.
Policy behaviorpgTAP tests run with supabase test dbUser B reading or changing user A's rows, signed-out access, and regressions after a migration.Only the cases you write.
Migrations and policies as codeA policy linter such as pgrls, which describes itself as betaPolicies that look wrong on review, such as broken row scoping between tenants or users.Whether the reviewed SQL is what gets deployed.
Secrets in the repositoryGitleaks, or GitHub secret scanning on public repositoriesPasswords, API keys and tokens committed to the repository.Nothing about access rules.

Why 'before deployment' changes the choice

Before deployment there is no public URL to probe, so tools that send requests to a running app have nothing to test unless you point them at a local, preview or staging build. The checks that work at this stage read configuration and code, or run tests against a local database. Supabase's CLI runs both its advisors and pgTAP tests against the local database by default.

What to look for in AI-written database code

  • A table created in a migration with no enable row level security statement. Supabase's RLS guide says a table in an exposed schema without RLS is readable and writable by any role with a grant on it.
  • A policy with using (true) for a role that should be restricted. The same guide says such a policy for anon gives every signed-out visitor read access to every row the role can reach through grants.
  • A select policy with no matching insert, update or delete policy, or a write policy with no with check. Supabase describes with check as what stops a user from creating a row that belongs to someone else.
  • A policy that trusts user_metadata. The advisor has a dedicated check for this because users can edit that field themselves.
  • A view over a protected table that was not created with security_invoker = true.
  • A secret or service_role key in client code. Supabase's API keys guide says these keys bypass RLS and must stay on a server.

Not on Supabase?

The same layers apply to any database: configuration, behavior tests and code review. For Postgres, check which role the application connects as. The PostgreSQL docs say superusers and roles with BYPASSRLS always bypass row security, and table owners normally do too.

Where a source scan fits

Vibe App Scanner can review a GitHub repository or a ZIP before anything is deployed. The code report points to issues in committed SQL policies, grants and supported server handlers, with the file where each was found. After deployment, a separate URL scan checks what the Supabase tables it discovers return to public clients.

A URL scan observes behavior it can reach, for example that a read returned rows. It cannot prove how a policy is defined, whether writes are blocked, or that tenants are isolated. A code scan reviews a snapshot of the source and cannot prove what is deployed.

Plans are Go at $29 a month and Pro at $49 a month. New accounts start with a 7-day trial that requires a card and includes 3 scans in total across deployed URLs and repositories. The plan you picked starts when the trial ends unless you cancel first. See pricing. Both report types have a fictional example you can read without an account: a website report and a code report.

Related questions

Is there one scanner that covers database access control end to end?
No. Configuration checks, behavior tests and code review each see a different layer. Use the free configuration check first, then add tests for the rules that matter most.
Can I scan before the app is deployed?
Yes, for configuration, tests and code. Supabase documents that its CLI runs advisors and pgTAP tests against a local database by default. Tools that probe a running app need a local, preview or staging URL.
Does a clean Security Advisor result mean my data is private?
No. It means the checks it runs found nothing. A policy can exist and still be too broad for your data model, which only a test as another user shows.

Sources checked

Each claim about another product on this page was read on the page linked here on . Plans and features change, so confirm on the source before you rely on them.