What it finds on a demo project

The CLI reads your Supabase migrations and schemas alongside the browser code that queries each table. It reports tables without row level security, tables or operations with no policy, policies with no per-user condition and service-role keys in browser code.

SiteCMD CLI 2.0.0
Demo project: Supabase app with row level security gaps
npx sitecmd audit .
SiteCMD Code Scan - .
Checked: November 9, 2026
Framework: Express
Issues: 6 total | critical 0 | high 2 | medium 4 | low 0

High (2)
- [Database Analysis · security] Client-facing Supabase code references a service-role credential name - src/components/AdminPanel.jsx:3
- [Database Analysis · security] Client-facing Supabase write policy has an unconditional row condition - supabase/migrations/20260101000000_init.sql:13

Medium (4)
- [Database Analysis · data] Client-facing Supabase operation has no matching local RLS policy - src/components/Dashboard.jsx:8
- [Database Analysis · data] Client-facing Supabase table has RLS enabled but no local policies - src/components/Dashboard.jsx:7
- [Database Analysis · security] No recognized local RLS enablement for a client-accessed Supabase table - src/components/Dashboard.jsx:6
- [Database Analysis · security] Client-facing Supabase write policy has no clear per-row caller boundary - supabase/migrations/20260101000000_init.sql:16

Your code passes? Now watch your site.

Join the waitlist

Understand how Supabase row level security grants access

  • Enabling RLS doesn't create a policy. With RLS enabled, table data stays unavailable through a publishable key until policies allow access. Allow only the operations and rows the caller needs.

  • For a user-owned table, a policy can link the signed-in user to the row owner. Read the Supabase RLS guide before adapting a policy to your data.

Test Supabase RLS policies with different users

  1. 1

    Try the intended database operation

    Use a local or staging project and the same role your app uses. Confirm the user can read or change the rows the policy is meant to allow.

  2. 2

    Try another user's rows

    Repeat the operation as a second user and while signed out. Include writes; permission to read a row doesn't mean permission to change it.

  3. 3

    Write the tests down

    Save these allow and deny cases as a SQL test file under supabase/tests and run them with supabase test db.

Frequently asked questions

Why is my Supabase RLS policy not working?

Start with the operation, role and policy condition. For example, auth.uid() is null without an authenticated user, so auth.uid() = user_id doesn't match that request. Check the table grant separately.

Can a Supabase secret key or service-role key go in browser code?

No. Both bypass row level security, so Supabase says never to use them in the browser. Supabase is deprecating the service_role key by the end of 2026 in favor of secret keys, which stay on your server; the browser uses the publishable key.

Confirm you're a person