You turned on remixing for your Lovable project. Here's exactly what you exposed
Remix copies your code, not your secrets. That's only good news if your secrets were never in your code.

Short answer: a public remix hands anyone a full copy of your project's code. Values stored in Lovable Secrets aren't copied, but anything written into the code is: hard-coded API keys, a pasted service_role key, your Supabase URL and table names, admin emails. If a secret was ever in the code, rotate it.
Remixing is one of Lovable's best features. You build a template, someone clones it and makes it their own. It's also a quiet way to publish your source code, and most people turn it on without thinking about what's in that source.
What a remix copies
Per Lovable's documentation, a remix creates a new project from yours, including the code. Lovable Secrets (the values your Edge Functions read) aren't copied. In practice that splits your project into two buckets:
Copied (now visible to whoever remixes):
- Every component, page and hook
- Any key or token written directly in code, including in comments
.env-style values that live in the code rather than in Secrets, especially anything with aVITE_prefix- Your Supabase project URL and publishable/anon key (both meant to be public, but they tell people where your database is)
- SQL migrations: table names, column names, and every RLS policy you wrote
- Hard-coded admin emails, feature flags, test accounts and passwords
Not copied:
- Values in Lovable Secrets / Supabase Edge Function secrets
- Your database contents
- Your users' accounts
Why the migrations matter more than you'd think
Your migrations are a map. Someone reading them learns which tables exist, which hold personal data, and exactly which policies protect them. If a policy says USING (true) or only checks that a user is signed in, they don't need to guess. Your live database is still the one your published app talks to, and the anon key in the code points straight at it.
So a public remix turns "a weak policy someone might find" into "a weak policy documented for anyone who looks."
The 20-minute cleanup
1. Search the code for secrets. In Lovable's code view (or the synced GitHub repo) search for: sk_live, sk-, sk-ant-, service_role, sb_secret_, re_, whsec_, AIza, password, token. Also search chat-pasted strings: long random-looking values in constants files.
2. Rotate anything you find. Removing it from the code isn't enough. Remixes made before you removed it still have it. Create a new key at the provider, move it into Lovable Secrets, read it from an Edge Function, delete the old key.
3. Read your own policies as a stranger would.
select tablename, policyname, cmd, qual, with_check
from pg_policies where schemaname = 'public';
Anything with true on a table holding user data needs an owner-scoped policy (auth.uid() = user_id) now.
4. Remove hard-coded admin logic. Replace if (user.email === 'me@...') with a role column checked by RLS, so the remix doesn't tell anyone which email unlocks admin.
5. Decide whether remixing should stay on. For a template meant to be shared, keep it on but make sure the template has no live keys and points at a demo Supabase project, not production. For a real product with users, turn it off.
Check the published app too
Remix exposure is about your code. Your published URL has its own exposure: whatever the build shipped to every visitor. A key that's in the code is usually also in the JavaScript bundle. Check both.
The fastest outside check is the free scan on the Lovable check page: it reads what your published app sends to a visitor, flags secret keys in the bundle, decodes any Supabase JWT to see if it's a service_role key, and runs count-only anonymous reads on your tables. If you only want the key check, the exposed API key checker does just that. The scan and first full fix are free; the $9 Fix Report unlocks every fix as a paste-ready Lovable prompt.
A quick self-test
Open a private window, remix your own project into a throwaway account, and read the copy as if you were a stranger. Anything you'd be uncomfortable seeing there (a key, an admin email, a policy that says true) is what every remixer already sees. Five minutes of reading beats an hour of guessing.
A template-safe setup
If you want to share remixable templates without risk:
- Keep a separate Supabase project for the template, with seed data only.
- Store every server key in Secrets from day one; never paste a key into chat.
- Put "Never write secret keys in frontend code; server keys go in Supabase secrets" in your project knowledge so Lovable follows it on every prompt.
- Before enabling remix, run the search in step 1 one more time.
Remixing doesn't leak your secrets. Code does. If the code is clean and the policies are right, a public remix shows people how you built it and nothing more.
Common questions
Can I see who remixed my project? Treat any remix as permanent. Even if you turn remixing off, copies made earlier keep whatever code they had at that moment, which is why rotation, not deletion, is the fix.
Is my Supabase URL in the code a problem? Not by itself. It's in your published bundle anyway. It becomes a problem only when combined with weak policies or a secret key, which is why steps 2 and 3 matter more than hiding the URL.
Does making the project private undo it? It stops new remixes and new viewers. It doesn't recall copies that already exist.
Are Lovable Secrets safe from remixes? Lovable's documentation says secret values aren't copied into a remix. The risk is values that were never put in Secrets: keys pasted into a component, a config file or the chat that later became code.
What about collaborators? Anyone with edit access to the original project can read the code too. Review the member list at the same time you review remix settings.
Built by Brennan Zambo.
Comments
Join the discussionNo comments yet. Be the first to comment.