Vibe Coding: What It Is, Where It Works and How to Review AI-Written Code Before It Hurts You
· 4 min read

This article is for founders, freelancers, students and developers who have built something with an AI coding tool and want to know whether it is safe to put in front of customers. You will get a clear definition of vibe coding, the evidence on how secure AI-written code is, and a six-step review habit you can start using today.
What vibe coding means
The term comes from Andrej Karpathy, an OpenAI co-founder and former Tesla AI director. In a post on X in February 2025 he described a new kind of coding he called "vibe coding": you describe what you want, accept what the AI writes, and stop worrying that the code exists. Collins Dictionary named "vibe coding" its Word of the Year for 2025, announced on 6 November 2025, defining it as writing computer code using natural-language prompts to an AI.
The idea matters because it describes a real change. People with no programming background can now produce working apps. But the original meaning includes not reading the code, and that is where the trouble starts.
Where it works well
Vibe coding suits work where failure is cheap:
- A throwaway prototype to test an idea with five users. - A personal script that renames files or cleans a spreadsheet. - A landing page or internal tool that holds no private data. - Learning: asking the AI to build something, then asking it to explain each part.
In these cases, speed matters more than polish, and a bug costs you an afternoon.
Where it goes wrong
Trouble begins when the app handles other people's data, takes payments, logs people in or has to keep working for years. The usual failures are:
- **Security holes.** The code runs, so it looks finished, but it may accept bad input, expose data or store secrets in the open. - **Code nobody understands.** When something breaks, there is nobody who knows why. - **Fragile changes.** Each new prompt can undo something that worked. - **Hidden costs.** Unreviewed code can be slow, repeat work or call paid services in loops.
What the research says about security
Veracode, a code-security company, published a report on 30 July 2025 testing more than 100 large language models on 80 coding tasks designed around known weakness types. According to Veracode, AI-generated code introduced security flaws in about 45% of test cases. It reported that Java was the worst performer, with a security failure rate above 70%, and that models failed to defend against cross-site scripting in 86% of relevant samples and log injection in 88%. Veracode said newer and larger models were no better at writing secure code, even though they wrote more correct code.
Treat this with care. It is one vendor's test, and Veracode sells code-scanning tools. Still, it points the same way as common sense: working code is not the same as safe code.
Six checks before AI-written code goes live

1. **Read it.** If you cannot explain a part, ask the AI to explain it line by line, then check the explanation against the documentation. 2. **Test it.** Ask the AI to write tests, then add tests for edge cases and wrong input, not only the case that works. 3. **Scan it.** Run an automated security scanner and a dependency check on every change. Many are free for small projects. 4. **Guard secrets.** Keep API keys and passwords in environment variables. Never paste them into a prompt or commit them to a repository. 5. **Take small steps.** Commit after each working change so you can see what changed and roll back. 6. **Name an owner.** One person is responsible for anything customers will use, and approves it before release.
A rule of thumb for teams
Use full vibe coding for prototypes. Use AI-assisted coding, with review, for anything you will keep. The tool is the same; the difference is that a person reads, tests and owns the result. If the app touches payments, health data or personal records, have an experienced developer review it before launch.
If your AI tool can also run commands or connect to services, limit what it may do. Our guide to [AI agent security](https://encoderbytes.com/Blog/prompt-injection-explained-security-hole-in-every-ai-app) explains why untrusted text can steer a tool that has too much access.
Sources
Collins Dictionary Word of the Year 2025, coverage by The Register: https://www.theregister.com/2025/11/06/vibe_coding_escape_the_clutches/
Veracode, AI-generated code poses major security risks in nearly half of all development tasks: https://www.veracode.com/press-release/ai-generated-code-poses-major-security-risks-in-nearly-half-of-all-development-tasks-veracode-research-reveals/
Veracode, 2025 GenAI Code Security Report: https://www.veracode.com/reports/2025-genai-code-security-report/
Help Net Security, coverage of the Veracode report: https://www.helpnetsecurity.com/2025/08/07/create-ai-code-security-risks/
Frequently asked questions
What is vibe coding?
Vibe coding is building software by describing what you want to an AI and accepting its code without closely reading it. Andrej Karpathy coined the term in February 2025, and Collins named it Word of the Year for 2025.
Is vibe coding safe for a real product?
Not on its own. Veracode's 2025 tests found security flaws in about 45% of AI-generated test cases, so code for real users needs review, testing and security scanning.
Can a beginner build an app with vibe coding?
Yes, for prototypes and personal tools. Before real customers use it, have the code reviewed and keep secrets out of it.