Vibe Coding in Production, What Breaks and What to Check
Published on — Last updated
Vibe coding means you describe what you want, accept what the AI writes, and mostly stop reading the code. It works well for a weekend toy. In production, it tends to break in six places, which are access control, data, secrets, tests, integrations, and operations. This post goes through each one with sources, and ends with a short pre-launch checklist.
What vibe coding means
Andrej Karpathy coined the term in a post on X in early 2025. He described a way of coding where you give in to the vibes and forget that the code exists. Vibe coding tools now range from app builders such as Lovable and Replit to coding agents in your editor.
I use AI coding tools too, including Claude Code and Laravel Boost. In my opinion, the risk is not the tool. The risk is shipping code that nobody has read.
Why the numbers are only a hint
Three vendors have published numbers on AI-written code. All three sell security or code quality products, and they use different methods, so I treat the numbers as hints about where to look.
- Veracode, vendor-quoted, tested more than 100 models on 80 coding tasks. About 45 percent of the results introduced a security flaw. Java was worst at over 70 percent, and Python, C#, and JavaScript ranged from 38 to 45 percent. These are coding tasks, not a measure of real apps.
- CodeRabbit, vendor-quoted, compared 320 pull requests marked as AI co-authored with 150 human ones. The AI group had about 1.7 times more issues per pull request, 10.83 against 6.45. The sample is small, and authorship could not be confirmed.
- GitGuardian, vendor-quoted, found that Claude Code-assisted commits on public GitHub leaked secrets at 3.2 percent, against 1.5 percent for all commits. GitGuardian itself says this should not be read as a simple tool failure.
Access control breaks first
The login page works, so the app feels safe. But the rule for who may see which row is missing. OWASP puts broken access control at number one in its Top 10 for 2025.
The clearest case is Lovable. CVE-2025-48757 describes an insufficient row-level security policy in Lovable-built sites that let anyone read or write tables. It has a score of 9.3 and was published on 30 May 2025. Lovable disputes it and says customers must protect their own app data, so the sources do not agree on who owns the problem.
The Supabase docs explain the root cause. A table in an exposed schema without row-level security is readable and writable by any role that has a grant on it.
In a Laravel app the same gap looks different. It is a route with no policy, a controller that never calls authorize, or a model with an open fillable list. To check, log in as user A and request user B's records. Do this for every route that takes an id.
Data breaks quietly
In my opinion, models often write migrations that work on the first run but skip unique indexes, foreign keys, and a plan for backups.
A harder risk is an agent that holds production credentials. In July 2025, SaaStr founder Jason Lemkin said that Replit's agent deleted a database despite his instruction not to change code. The Register reported his account and did not verify it.
The lesson holds either way. Keep separate databases and keys for development and production, and never give an agent the production one. Restore a backup once before launch, because an untested backup is only a hope.
Secrets leak fast
GitGuardian counted 28.65 million new hardcoded secrets in public GitHub commits in 2025, a rise of 34 percent over 2024. Again, that is vendor-quoted. It also found 24,008 secrets in MCP-related config files, and 2,117 of them were valid.
It is easy to paste a key into a file to get something working, and then the file is committed. Add .env to your ignore list, run a secret scanner in your pipeline, and rotate any key that was ever in a prompt or a repo.
The Laravel docs say APP_DEBUG must always be false in production, because debug mode can show configuration values to your users. Check that one by hand.
Tests are written by the same model
When a model writes the code and then the tests, the tests often check what the code does and not what it should do. This is my opinion from how the process works, and I have no study to cite. The result is a green test run that proves little.
Write a few tests yourself for the parts that cost money if they fail. Those are payments, access rules, and anything that deletes data. Run them in CI before every deploy.
This is the same point I made about agents in agent evaluation. Check the outcome, not only the answer.
Payments and integrations fail in ways a demo never shows
A demo calls an API once and it works. Production calls it thousands of times, with timeouts, retries, and strangers who send fake requests.
Stripe's webhook docs show what this means for payments. Stripe can send the same event more than once, so you should log event IDs and skip repeats. Events can also arrive out of order. Without signature checks, an attacker can send fake events to your endpoint to trigger actions such as fulfilling orders.
The docs also say to return a success code fast and to do the slow work in a queue. A generated webhook handler may skip any of these steps. Read it for four things. It should verify the signature, record event IDs, not depend on event order, and hand slow work to a queue job.
Operations are the missing half
A vibe-coded app can ship with no error alerts, no health check, and no rollback plan. Then a customer finds the first failure. OWASP also lists security logging and alerting failures in its 2025 Top 10.
Laravel gives you a start. It has a built-in health route at /up that works with an uptime monitor, as the Laravel deployment docs describe. The docs also say to run the optimize command in each deploy and to restart queue workers after it, so they use the new code.
Someone also has to own the system. In your AI agent is not a coworker I wrote about HBR research by Emma Wiles of Boston University. As that post reports, people caught 18 percent fewer errors when work was labeled as coming from an AI employee instead of a software tool. Treat the AI as a tool, and make sure a person can explain every file that touches auth, payments, and data.
A pre-launch checklist
- Every route has an owner check, tested with two users.
- Every table or model has a policy or row-level rule, and fillable lists are closed.
- Development and production use separate databases and keys.
- A backup has been restored at least once.
- A secret scan is clean, old keys are rotated, and APP_DEBUG is false.
- Dependencies are checked with composer audit.
- Tests for money, access, and deletion run in CI.
- Webhook handlers verify signatures and ignore repeat events.
- Error alerts, a health check, and a written rollback step exist.
- One person has read and can explain the auth, payment, and data code.
If you want a second person to review a Laravel app before launch, my page on hiring a Laravel engineer has the details. For a fixed-price review of an AI-built app, I offer a vibe-coded app audit.