Home / Guides / Supabase anon key explained: public by design, safe only with RLS

Supabase anon key explained: public by design, safe only with RLS

Why seeing your anon key in the browser is normal — and when it becomes a breach.

Check your live site

Run the free ShipLatch scan on your own site without leaving this page.

Uses 1 of your 3 free scans today; a site scanned in the last 24 hours answers from that scan. Passive and read-only: we only look at what any browser can see. Only check sites you own or may test.

What the free scan checks

  • Leaked keys in your live JavaScript (AI, payment and cloud keys), including a Supabase service_role key
  • Files that should never be public, like /.env and /.git
  • Supabase and Firebase secrets in the browser: an sb_secret_ key, a Supabase access token or a Firebase service-account file
  • HTTPS and security headers (CSP, HSTS, clickjacking protection)

It only reads what any visitor's browser can see. It doesn't log in, read your tables or check App Check.

Related free check: Is your Supabase app exposing more than it should?

Update (Oct 2026): Supabase is replacing anon/service_role with sb_publishable_/sb_secret_ keys. Read the update →

If ShipLatch (or DevTools) shows your Supabase anon key in the frontend, that alone is not a vulnerability. Supabase documents the anon key as a public, low-privilege key. Authorization is enforced by RLS and your policies.

It is a problem when:

UpGuard has written about systemic Supabase exposure at scale, including vibe-coded apps and agent-built projects (Everything Everywhere).

Copy-paste into your AI builder
Keep the Supabase anon key in the client. Audit every table: RLS must be on, and policies must restrict rows with auth.uid(). Flag any service_role usage in the frontend as critical.

Related: Enable RLS · service_role

Scan your app free

Paste your URL. ShipLatch checks for leaked keys, exposed /.env and /.git, and flags Supabase/Firebase so you know what to lock down. The free scan finds the issues; the $29 Fix Pack gives you fix prompts written for your app and re-scans that prove each fix worked.

Scan free at shiplatch.com → See the Fix Pack

Want the whole pre-launch process in one place? See what's inside App Security for Vibe Coders, our $9 PDF playbook, or go straight to checkout.

More guides