Supabase service_role key is in your website's code
- Found in
/assets/index-4f2a.jseyJhbG…(207 chars)
What it means
The service_role key is the master key of your Supabase project: it ignores every Row-Level Security policy. Anyone can open your site, read this key from the JavaScript, and read, change or delete every row in your database and every file in storage.
How to fix
- Rotate the key now: in the Supabase dashboard go to Project Settings → API (or API Keys) and roll the service_role / secret key. The leaked one keeps working until you do.
- Remove the key from the frontend code and from any VITE_ / NEXT_PUBLIC_ environment variable.
- Move the operations that needed admin rights into a Supabase Edge Function or server route that keeps the key secret.
Fix prompt for AI coding tools
I'm building this app in Lovable. A security scan of my live site https://yoursite.com found a problem I need you to fix. Problem: Supabase service_role key is in your website's code. …
I'm building this app in Bolt. A security scan of my live site https://yoursite.com found a problem I need you to fix. Problem: Supabase service_role key is in your website's code. …
A security scan of the deployed version of this codebase (https://yoursite.com) found the problem below. Fix it in this repository. Problem: Supabase service_role key is in your website's code. …
A security scan of my live website https://yoursite.com found a problem I need help fixing. Problem: Supabase service_role key is in your website's code. …