Vibe Coding Security: 5 Flaws to Fix Before You Launch
Vibe coding security checklist for Cursor, Lovable, Replit, and Claude Code apps. Catch exposed keys, missing RLS, and MCP risks free with Lockpick.

Vibe coding security is the work of closing the holes AI coding tools leave behind when they build for speed. Tools like Cursor, Lovable, Replit, and Claude Code get the feature working first. Before real users arrive, fix five recurring flaws and scan the live app from the outside, the way an attacker would.
TL;DR
- AI-built apps tend to fail in five places: secret keys in the browser bundle, Supabase Row-Level Security turned off, paywalls checked only in the frontend, hallucinated dependencies, and over-scoped agents and MCP servers.
- Broken access control, the category that covers open database tables and frontend-only paywalls, is number one on the OWASP Top Ten.
- Slopsquatting is when an attacker registers a package name that AI models tend to invent on npm or PyPI, then waits for a developer to install it.
- A manual penetration test typically runs $8,000 to $15,000 or more over two to four weeks, while a Lockpick outside-in scan is free to start and takes about five minutes.
The 5 Vibe Coding Security Flaws AI Tools Ship by Default
AI coding tools ship the same five flaws again and again, and none of them is exotic. I see them in projects built with Lovable, Bolt, Replit, Cursor, and Claude Code alike. Each one is a shortcut the model took to get your feature working.

- Secret keys in the browser bundle. Models put API keys in client components or give them a
NEXT_PUBLIC_orVITE_prefix, which ships them to every visitor. Anyone with DevTools open can copy the key. In the OpenCode breach, one stolen key ran up over $400 overnight. - Database tables anyone can read. Supabase ships a public key to the browser by design, so Row-Level Security is the only thing guarding your rows. Generated schemas often leave it off. One of the most common findings from our scanner is a table that returns real customer rows to a request with no sign-in.
- Paywalls and role checks that live in the frontend. Hiding an admin button in React state does not protect the API route behind it. Check the session and the plan on the server for every paid or destructive action. Broken access control is number one on the OWASP Top Ten for a reason.
- Hallucinated dependencies. Models invent package names that sound right. Attackers register those names on npm or PyPI and wait, a trick called slopsquatting. Look up any package you do not recognize before you install it.
- Agents, skills, and MCP servers with too much access. A local MCP server or a downloaded skill often runs with your full laptop permissions. The MCP security best practices call for minimal scopes, and the OWASP GenAI project lists excessive agency among its top risks.
Why Do AI Coding Tools Write Insecure Code?
They build what you asked for, and you asked for a feature that works. A strict database policy or a server-side check is friction between the prompt and a working demo, so the model skips it unless you say otherwise. The code compiles, the page loads, and nothing looks wrong.
You only see the problem from the outside, and that is a view most builders never take. They read their own repo, run their own tests, and never look at what the deployed app serves to a stranger. I showed how attackers do that looking in my uncensored AI hack your app walkthrough.
How Do You Secure a Vibe-Coded App Before Launch?
Scan the live app from the outside, fix the high-risk findings on the server, and scan again. Reading your own repo will not show you missing security headers, exposed source maps, or open API routes. It will not show weak email records like SPF, DKIM, and DMARC either. Those only appear in what the deployment actually serves.

This is the gap my team built Lockpick to close. We describe it as antivirus for vibe-coded apps. Paste in a live URL, a website, an agent skill, or a GitHub repo. It reports what an outsider can see, explains each finding in plain words, and writes a fix prompt for Claude Code, Codex, Gemini, or Cursor.
Run the prompt, then scan again. The second scan is the step people skip, and it is the only proof the hole is closed. A model telling you it is fixed is not proof.
Do You Need a Free Scan, a Security Review, or a Pentest?
It depends on who uses the app and what data it holds. A side project needs the free scan. A product holding customer invoices needs a person looking at the architecture. A deal with an enterprise buyer may need a pentest or SOC 2, and not before.

| Option | Typical cost (2026) | Timeline | What it covers | Best for |
|---|---|---|---|---|
| Lockpick scan | Free to start | About 5 minutes | Exposed keys, headers, email DNS, open endpoints, skills, repos | Every builder before a link goes live |
| AI cybersecurity review | Scoped on a 15-minute call | Days | Lockpick scan plus hand verification of apps, agents, skills, and MCP servers | Live apps with real users |
| Penetration test | $8,000 to $15,000+ | 2 to 4 weeks | Manual exploitation of apps, APIs, and networks | Enterprise sign-off and regulated data |
| SOC 2 Type I or II | $25,000 to $90,000 | 3 to 9 months | Compliance controls, evidence, auditor attestation | Selling into large procurement teams |
The pentest and SOC 2 figures are typical market ranges for small teams, not quotes. My advice is to spend in that order. Paying $25,000 for SOC 2 paperwork while an open table sits in production is the wrong way around.
The full price breakdown is in my AI security audit guide. For MCP servers and skills, see AI agent security. If your builders ship every day, pair the review with AI training for teams so the checks become habit. And because a vendor outage can stop a launch as easily as a bug, keep a printed business continuity plan template nearby.
Final Notes from Mark
Building ten times faster is a real edge. It also means you can ship ten times more open doors in the same week. I do not think the answer is to slow down. Look at your app the way a stranger would before your customers do, fix what you find, and look again.
Vibe Coding Security FAQs
How do you secure a vibe-coded app before launching to real users?
Check five things before launch. Move every secret key out of the client bundle, turn on Row-Level Security and test that one user cannot read another user's rows, and enforce paywalls and roles on the server. Look up any package you do not recognize. Then run an outside-in scan to catch exposed headers, keys, and open endpoints.
Why do Lovable, Cursor, and Replit apps have security issues by default?
Coding models optimize for making the feature you asked for work on the first try. Strict database policies and server-side checks add friction, so the model often skips them. It may drop an API key into a client file or check a user's role in React state unless you ask for the server-side version and verify it.
Is Supabase safe for a vibe-coded app?
Yes, if Row-Level Security is on. Supabase ships a public key to the browser by design, so the policies on each table are what protect your data. Enable RLS on every table, write a policy so users read only their own rows, keep the service role key on the server, and test with a signed-out request.
How much does an AI security audit or pentest cost in 2026?
A Lockpick scan is free to start. A manual penetration test for a small company typically runs $8,000 to $15,000 or more over two to four weeks, and SOC 2 readiness typically runs $25,000 to $90,000. A human-verified AI security review sits between a free scan and a pentest, and ours is scoped on a 15-minute call.
Does traditional penetration testing cover MCP servers and AI agent skills?
Usually not. A traditional pentest focuses on web forms, servers, and network ports. AI stacks add prompt injection paths, MCP servers with broad OAuth tokens, and local skill files with hardcoded keys. Ask any reviewer in writing whether agents, skills, and MCP servers are in scope before you sign.


