Muji Lab
FranceProduction

Your app was generated in an afternoon. Here is what will break

Hicham Thabti4 min read

Generating an application and running one are two different jobs. The first was democratised in two years. The second was not. That gap is the whole distance between « it works » and « it holds ».

The term vibe coding was coined by Andrej Karpathy on 2 February 2025: describing what you want in natural language, accepting the generated code without reading it closely, and fixing problems with follow-up prompts rather than by reasoning through the code. It was not meant as criticism. It became a mass practice, and the consequences are now measurable.

What the published measurements say

Veracode's 2025 GenAI Code Security Report found that 45% of AI-generated code samples contained at least one OWASP Top 10 vulnerability when reviewed without human oversight. That last condition matters: the measurement covers code accepted as-is, which is precisely the definition of vibe coding.

Research published by the Cloud Security Alliance labs on deployed applications reports exposed secrets and high-impact vulnerabilities at scale. This is not lab work. It is live code, used by real people.

What those numbers do not say

They describe a market average, not your application. Code that was generated and then reviewed, tested and hardened beats code written by hand and never tested. The tool that wrote the code is not the question. What happened afterwards is.

The six failures we find almost every time

  1. API keys in the repository. Public repositories are scanned continuously by bots, and a key pushed once stays in the history even after you delete the file. Treat it as compromised: rotate it, do not just remove it.
  2. No automated tests. Without them, nobody knows what breaks when a line changes. This is what produces the application nobody dares touch.
  3. No cost ceiling per request. Specific to apps calling a model. Without a cap per request, per user and per month, a runaway loop turns into an end-of-month invoice.
  4. No failure recovery. What happens when the model errors, the database stops answering, the provider slows down? Usually nothing is planned. Those three are normal operating conditions, not rare events.
  5. No logs, no alerts. The classic symptom: you learn about the outage from a customer. Often this brick is missing entirely.
  6. Backups never restored. A backup you have never restored is a hypothesis, not a backup. Test the restore in real conditions at least once.

The order to fix them in

Fixing everything at once is the surest way to ship nothing. The order that works follows how irreversible the damage is: secrets first, because an exposed key may be in use right now. Then backups, because everything else becomes recoverable once you can roll back. Then cost ceilings, then tests on the paths that touch money and personal data, then logs and alerts, then failure recovery.

The most expensive reflex

Rewriting everything. It is the first advice many vendors give, and it is almost always the costliest and riskiest option. Taking over existing code is cheaper in the large majority of cases. Ask to see the arithmetic before accepting a clean slate.

Got an application that needs to survive production?

Request an audit

Frequently asked questions

Is AI-generated code less secure than hand-written code?

The published measurements, including Veracode's 2025 report, cover code accepted without human review: under those conditions 45% of samples carried at least one OWASP Top 10 vulnerability. The tool that wrote the code matters far less than the review, testing and hardening that followed.

Is an API key in the code really that serious?

Yes. Repositories are scanned continuously, and a key pushed once remains in the history even if you delete the file afterwards. Rotate it and replace it rather than simply removing it.

Should we rewrite from scratch?

Almost never. Taking over the existing code is cheaper and less risky in most cases. A rewrite only makes sense when the arithmetic shows it costs less than remediation, and that arithmetic should be shown to you.

How long does an audit take?

A few days for an application of ordinary size, starting from read access to the repository. The timeline usually depends on how fast access is granted.