Plainmend

Notes

Don't ship service_role in the browser

The Supabase anon key is fine in the browser. Row Level Security is what keeps a person's rows private.

A service_role key, or a key that starts with sb_secret_, is different. It bypasses Row Level Security. Anyone who can download your built JavaScript can use it.

Search the files your site sends to the browser for service_role and sb_secret_. Move those keys to server-only code, then rotate them in the Supabase dashboard.

When that is done, run a free scan at plainmend.com.