Supabase Anon Key (Publishable Key)
Glossary
The anon key (in new projects: publishable key, prefix sb_publishable_) is the public key of a Supabase project. It is designed to sit in the browser and only sees what your Row Level Security rules allow. A visible anon key is therefore not a leak. But if RLS is not active on a table or too permissive, anyone holding this key can query the data of all users, bypassing the login.
Supabase gives you two kinds of keys. The public one (formerly “anon”, now “publishable”) belongs in the frontend and is bound to RLS. The secret one (formerly “service_role”, now “secret” with the prefix sb_secret_) bypasses every RLS rule and belongs on the server only. You find both in the Supabase dashboard under Settings → API Keys; on older projects the old keys sit in the tab for legacy keys.
The most common misconception: “The key is in the browser, so we have to hide it.” You can't, every visitor downloads it with the app, and that is by design. The real question is what it gets you. The database talks to the browser directly; from the anon key onwards, your entire data security rests on Row Level Security, not on the login screen.
How to check it: RLS must be enabled on every table, and every policy must be bound to the user's identity (typically auth.uid() = user_id), not to “using (true)”. The free decivo Scan takes the same route from the outside as an attacker would: it reads the project URL and anon key from the shipped code, lists the tables granted to the anon role and checks whether rows actually come out with this key. It counts via a response header only; no row is fetched.