Is vibe coding safe? It depends on who reads the code, what it can touch, and how you undo it.
Vibe coding is safe for a throwaway prototype. Studies of AI-written code show why production software needs review, limited permissions and a way back.
This guide collects what security research has measured about code written by AI models and coding agents, the failure patterns behind real incidents, and the controls that turn a fast prototype into software a business can run.
Updated · 11 sources
- Pure vibe codingAccept every change, run it, paste errors back. Fine for a weekend project.
- Vibe coding with testsThe app is checked for behaviour. Security flaws pass, because they rarely break a feature.
- AI-assisted engineeringA person reads and can explain every change before it is merged.
- Governed buildingThe AI works inside permissions, a plan is approved first, and every change is recorded and reversible.
Is vibe coding safe?
Is vibe coding safe? For a throwaway prototype, usually. For software that holds real data, not on its own: Veracode’s 2025 tests found AI-generated code introduced a security flaw in 45% of tasks, and a 2025 benchmark of coding agents found that most solutions that worked were still insecure. It becomes safe when a person reviews what was built, the AI acts with limited permissions, and every change can be undone.
Vibe coding means the code ships without anyone reading it.
Andrej Karpathy named it on 2 February 2025: “fully give in to the vibes … and forget that the code even exists.” He described accepting every change and no longer reading the diffs. The safety question follows directly from that loop.
- DescribeSay what you want in plain words, often by voice.
- Accept allTake every change the model proposes without reading it.
- Run itLook at the result in the browser or the terminal.
- Paste the error backWhen something breaks, hand the message to the model and let it fix itself.
Repeat until the app appears to work. “Works” is the only test the loop applies, and security flaws rarely stop an app from working.
Simon Willison drew the line a month later: vibe coding is building software with an LLM without reviewing the code it writes. The risk sits in shipping code nobody understands, whoever wrote it. His rule for production work: do not commit code you could not explain to someone else.
Is vibe coding safe? Five studies of AI-written code.
Researchers have tested code from assistants and agents since 2021. The tasks and models differ, and the finding repeats: code that runs is often code that can be attacked.
Confidence rises as security falls. In a controlled user study, people with an AI assistant wrote significantly less secure code than people without one — and were more likely to believe their code was secure (Perry et al., ACM CCS 2023).
Hints did not fix it. In the SusVibes benchmark, adding vulnerability hints to the feature request did not make the agents’ code secure. A prompt asks; only a check enforces.
Six ways a vibe-coded app fails in production.
Most failures come from a short list. Each is cheap to prevent when it is checked and expensive when a customer finds it.
Vibe coding in 2025: the incidents and the research, in order.
The term is recent, and so is the evidence. Two public incidents in 2025 show the access-rule and agent-power failures in practice.
- Feb 2025The term is coinedKarpathy describes vibe coding: accept all, stop reading diffs.
- Mar 2025Open databasesA researcher finds 170 of 1,645 apps from one AI app builder exposing data through weak row-level security (CVE-2025-48757, which the vendor disputes).
- Jul 2025Production data deletedA coding agent reportedly wipes a live database during a declared code freeze (AI Incident Database #1152).
- Jul 202545% of tasks flawedVeracode publishes its test of 100+ models on 80 tasks.
- Dec 2025Agents benchmarkedSusVibes: of an agent’s working solutions, most remain insecure.
What the two incidents share. Neither failure was stopped by words in a prompt. The exposed apps worked as asked, but nobody tested their access rules. The agent had been told to change nothing during the freeze, and the instruction did not hold. A tested access rule, a permission boundary and a backup would have; another prompt would not.
When vibe coding is safe enough, judged by data and lifespan.
Two questions settle most cases: does the software touch real data or systems, and will anyone other than you rely on it?
The controls that make AI-built software safe to run.
No single control is enough, so they stack. The Cloud Security Alliance’s Secure Vibe Coding Guide and OWASP’s guidance on excessive agency point to the same layers.
The step-by-step version, with what to check before each release, is the vibe coding security checklist.
How Botminds builds the safety into enterprise vibe coding.
On Botminds, Piper builds business applications from a conversation. The controls above are how the builder works rather than steps a person must remember.
- Brief and plan
Piper says back what it understood, asks the one question that would change the plan most, and shows a numbered plan before anything changes.
- Your yes
Nothing is built until you approve. Deletes need their own confirmation.
- Build as you
Every tool call runs as you, and your role is checked on each one.
- Read back
Piper checks each change landed and tests what it made.
- Package
Snapshots, diff, rollback, and a package that installs into another environment.
Why the result is safer than generated code
- Governed partsAgents, collections, pages and workflows that already carry permissions, audit and versions.
- 700+ platform toolsThe same catalogue your agents use, each behind the same checks.
- On the recordEvery change is recorded as agent work on your behalf.
Measured: 53 of 53. In a 150-conversation test bank run as three users with different roles, every request beyond the asker’s role was refused with no change. Read the full design in enterprise vibe coding, and meet the builder in the Academy lesson on Piper.
Vibe coding safety: common questions.
The technology behind itEnterprise vibe codingGoverned apps, built by conversation→Is vibe coding safe?
Is vibe coding safe depends on the stakes. For a throwaway prototype on sample data, it usually is. For software that holds real data, studies show AI-written code is often vulnerable, so it needs human review, security scanning, limited permissions and a way to undo changes.
Is vibe coding secure?
Not by default. Veracode’s 2025 tests of more than 100 models found a security flaw in 45% of tasks, and the SusVibes benchmark found only 11.8% of one agent’s solutions were secure even though 57% worked. Security has to be checked; it does not come with working code.
Are vibe coded apps safe to use?
Only if someone has checked them. The common failures — open database rules, secrets in the browser, injection flaws — are invisible to a user. In 2025 a researcher found 170 of 1,645 apps from one AI builder exposing data through weak database access rules; the vendor disputes the resulting CVE, saying each app’s owner is responsible for its data.
What did the “Is vibe coding safe?” paper find?
The paper by Zhao and colleagues (arXiv, December 2025; ICML 2026) built SusVibes, 186 tasks from real open-source projects, and tested 12 coding-agent settings. All performed poorly on security; adding vulnerability hints to the request did not fix it.
Is vibe coding reliable?
It is reliable at producing something that runs. It is less reliable at handling edge cases, errors and attacks nobody asked about. Tests catch behaviour; review and scanning catch the rest.
Is it safe to vibe code a website?
A static site with no forms, logins or data is low risk. Once the site takes input, stores data or uses keys, check for injection and cross-site scripting, keep keys server-side and turn on access rules in the database.
How do I make vibe coding safe?
Keep the AI away from production credentials, read every change before it merges, scan for vulnerabilities, secrets and invented packages, require approval for destructive actions, and keep backups and version history. The vibe coding security checklist lists each check.
Is vibe coding safe for enterprise use?
Enterprise use needs the builder to work within each person’s permissions, a plan approved before changes, an audit trail and rollback. Platforms built for enterprise vibe coding, such as Botminds with Piper, supply those controls in the process itself.
- Andrej Karpathy: the post that named vibe coding (X, 2 February 2025)x.com
- Simon Willison: Not all AI-assisted programming is vibe coding (March 2025)simonwillison.net
- Veracode: 2025 GenAI Code Security Report (July 2025)veracode.com
- Zhao et al.: Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Tasksarxiv.org
- Pearce et al.: Asleep at the Keyboard? Assessing the Security of GitHub Copilot’s Code Contributionsarxiv.org
- Perry et al.: Do Users Write More Insecure Code with AI Assistants? (ACM CCS 2023)arxiv.org
- Spracklen et al.: We Have a Package for You! Package hallucinations by code-generating LLMsarxiv.org
- Matt Palmer: Statement on CVE-2025-48757mattpalmer.io
- AI Incident Database: Incident 1152incidentdatabase.ai
- Cloud Security Alliance: Secure Vibe Coding Guide (April 2025)cloudsecurityalliance.org
- OWASP Top 10 for LLM Applications: LLM06:2025 Excessive Agencygenai.owasp.org
See it on
your own work.
Bring one process and its documents. We’ll show you the agents, the controls and the record, running on your data.