lovable
Is my Lovable app secure? A beginner checklist
A practical 12-point security checklist for Lovable, Bolt, v0, and Replit apps—secrets, Supabase, headers, and what to fix before you share the link.
Paste your production URL into the free Vibe Code Health grader for a Semrush-style score on secrets, headers, TLS, and common leaks—then come back to this guide for the fixes.
If you shipped something from Lovable, Bolt, v0, or Replit this month, you probably did the fun part: UI, auth stubs, a database, a public URL. The less fun part is answering a simple question before you paste that link in a Discord or send it to a customer:
Is this app safe enough to share?
You do not need to become a penetration tester. You do need a short, honest checklist that catches the mistakes vibe-coded apps make over and over—leaked keys, missing browser headers, open data tables, and “it works on my laptop” HTTPS assumptions.
This guide is for beginners. Every item is something you can check in under a minute, and most fixes are a paste into your AI builder or a host setting. When you want an automated pass over the public surface of your app, use the free Vibe Code Health grader—it is a Semrush-style score for secrets, headers, TLS, and common backend leaks, not a pentest.
What “secure enough” means for a vibe app
For a public demo or early product, “secure enough” usually means:
- No live secrets in the browser (Stripe live keys, Supabase
service_role, OpenAI keys, private PEM files). - HTTPS that actually works, with HSTS when you can.
- Browser defenses so a single XSS bug is less catastrophic (CSP, framing protection).
- Backend defaults that deny strangers (especially Supabase Row Level Security).
- No accidental file leaks (
.env,.git, source maps with full source).
You will still have product bugs. That is fine. What you want to avoid is “anyone on the internet can empty my Stripe account or read every user row.”
The 12-point beginner checklist
Work top to bottom. Stop and fix anything marked critical before you share the link widely.
1. Search your deployed JS for secret-shaped strings (critical)
Open your live site → DevTools → Network → reload → open a few .js bundles → search for:
sk_live_sk_test_(still sensitive—treat as high)service_roleAKIA(AWS)ghp_/github_pat_-----BEGIN/PRIVATE KEYsk-ant-/ longsk-OpenAI-style keys
Why: Anything shipped in client JavaScript is public. Attackers scrape hostnames from launch boards and scan automatically.
Fix: Move secrets to server-only env vars or Edge/server functions. Rotate any key that ever appeared in a client bundle. Stripe and OpenAI both document rotation in their dashboards.
Grade tip: Vibe Code Health forces an F if it finds a live secret in public files.
2. Confirm which Supabase key is in the browser (critical)
Supabase gives you at least two JWT-style keys:
| Key | Belongs in browser? | Role |
|---|---|---|
anon / public | Yes (expected) | Subject to RLS |
service_role | Never | Bypasses RLS |
Decode a JWT at jwt.io (or any local decoder)—look at the role claim. If you see service_role in frontend code, treat it like a master password that has already leaked.
Read the deeper guide: How to stop leaking Supabase keys.
Official reference: Supabase API keys.
3. Turn on Row Level Security on every table (critical for Supabase)
In the Supabase dashboard → Authentication / Table Editor → enable RLS on each table. Default-deny, then add policies that use auth.uid().
Without RLS, the public anon key can often read or write everything. Supabase is explicit that the anon key is only safe with RLS: Row Level Security.
4. Probe /.env and /.git/config yourself (critical if open)
In a private window, visit:
https://your-app.example/.envhttps://your-app.example/.git/config
You want 404 (or a generic host page), not a file full of DATABASE_URL= or [core].
Static hosts sometimes publish the project root by mistake. If either file is readable, rotate every secret inside and redeploy with a correct publish directory (usually dist / .next / build, never the repo root with env files).
5. Check HTTPS and the padlock (high)
Your share link should be https://. Click the padlock → certificate should be valid for your hostname. Mixed content (HTTPS page loading http:// scripts) can undo a lot of this.
MDN: HTTPS is still the right mental model.
6. Look for HSTS (medium)
In DevTools → Network → click the document → Response Headers → look for:
Strict-Transport-Security: max-age=…
HSTS tells browsers to stick to HTTPS. Vercel and many hosts add it by default; some DIY static hosts do not. See MDN: Strict-Transport-Security.
7. Content-Security-Policy (high)
Search response headers for Content-Security-Policy. If it is missing, browsers will happily run any script that lands on the page (XSS).
You do not need a perfect CSP on day one. You need a CSP, then tighten. Start with default-src 'self' and allow only the script hosts you actually use.
Copy-paste Next.js/Vercel examples live in Security headers explained for vibe coders. Spec overview: MDN CSP.
8. Clickjacking protection (medium)
You want either:
X-Frame-Options: DENY(orSAMEORIGIN), or- CSP
frame-ancestors 'none'
Otherwise other sites can iframe your UI and trick users into clicking “Delete” or “Approve.” OWASP Clickjacking explains the attack pattern.
9. X-Content-Type-Options: nosniff and Referrer-Policy (low / polish)
These are cheap wins:
X-Content-Type-Options: nosniffReferrer-Policy: strict-origin-when-cross-origin
They reduce MIME-sniffing surprises and stop full URLs (sometimes with tokens in query strings) from leaking to third parties.
10. Do not ship production source maps to the world (medium)
If app.js.map is publicly downloadable with sourcesContent, you handed attackers a readable copy of your source. Disable production browser source maps in Next (productionBrowserSourceMaps: false) or Vite (build.sourcemap: false), or block *.map at the CDN.
11. Cookies: Secure, HttpOnly, SameSite (medium if you set session cookies)
If you set your own session cookie, it should almost always be Secure; HttpOnly; SameSite=Lax (or Strict). Analytics cookies are a separate privacy conversation—link a Privacy Policy if you collect anything identifiable. MDN: Set-Cookie.
12. Re-scan after every “quick fix” from the AI (habit)
AI builders love to “just put the key in the client so it works.” After each prompt that touches auth, payments, or env vars, re-check items 1–4. Or paste the URL into Vibe Code Health again and compare the grade.
A 20-minute “ship day” routine
- Deploy to the real hostname (not only the preview).
- Run through checklist items 1–4 manually.
- Paste the URL into the grader.
- Fix the “Fix these 3 first” cards—use the copy-paste AI prompts if you want.
- Redeploy, re-scan, only then post the link publicly.
What this checklist does not cover
- Authenticated abuse (credential stuffing, broken access control inside the logged-in app)
- Dependency CVEs in
node_modules - Social engineering, phishing your users
- Compliance frameworks (SOC 2, HIPAA)—those need real programs, not a blog checklist
Passive graders and checklists catch the embarrassing public mistakes. They do not replace a security review for a regulated product.
Quick FAQ
“My Lovable app uses Supabase anon in the client—is that an automatic F?”
No. Anon in the client is expected. Missing RLS or a leaked service_role is the emergency.
“I only have a test Stripe key.”
Still remove it from the browser if you can. Test keys are abused for fraud experiments and will get your account restricted. Live keys are the hair-on-fire case.
“Can I ignore CSP because my UI library needs inline scripts?”
Do not ignore CSP entirely. Start loose ('unsafe-inline' if you must), ship something, then tighten. A missing CSP is how XSS becomes account takeover.
Next steps
- Grade your URL: Vibe Code Health
- Read Supabase keys: anon vs service_role
- Read Security headers with Next.js/Vercel copy-paste config
- Skim the Learn / FAQ glossary if terms feel dense
Ship the demo. Just do not ship your keys with it.