On this page
The short version
- AI tools can build a working app fast. A working app is not the same as a safe one.
- Studies disagree on how often AI code has flaws, so check it rather than trust it.
- The worst real incidents were not clever hacks. They were missing access rules, exposed keys and agents with too much power.
- Prototypes and internal demos are fine. Anything with customer data deserves a human review first.
What vibe coding is
In February 2025, the researcher Andrej Karpathy posted about a way of working he called "vibe coding": describing what you want, letting an AI write the code, accepting changes without reading them closely and pasting errors back in until it works. Collins Dictionary named it Word of the Year for 2025, defining it as the use of artificial intelligence prompted by natural language to write computer code.
For a business owner this is a real shift. A founder with no engineering background can now produce a booking tool or customer portal over a weekend. That is exciting, and it is why this guide exists: the app can look finished while hiding problems you cannot see.
What the evidence says
Here is the honest picture: studies point in different directions, because they measure different things.
- 2021, Copilot. Researchers tested GitHub Copilot on 89 scenarios based on well-known weaknesses and generated 1,689 programs. Roughly 40% were vulnerable. That was an early version of the tool.
- 2023, people with assistants. A user study published at ACM CCS found that participants with an AI assistant wrote significantly less secure code than those without, and were more likely to believe their code was secure. Those who trusted the AI less and engaged more with their prompts produced fewer vulnerabilities.
- 2025, Veracode. A security vendor tested more than 100 models on 80 coding tasks and found OWASP Top 10 flaws in 45% of cases. Larger models were not significantly better at security. This is a vendor study using its own scanner and short code-completion tasks, not whole apps.
- 2025, GitHub files. A preprint, not yet peer reviewed, analyzed 7,703 public files attributed to AI tools and found about 88% had no identifiable vulnerability. A useful counterweight.
So AI code can contain serious flaws, but not always. The UK's National Cyber Security Centre (NCSC) published a sensible framing in June 2026: a "vibe coding spectrum". Use AI freely for low-risk work, such as prototypes, demos and small internal tools with no sensitive data. Move toward manual oversight for authentication, sensitive personal data, secrets and credentials, safety-critical systems, or anything where a flaw would be serious. In its words, "The risk isn't in using AI. The risk is not applying the right safeguards when the stakes are high."
What about speed? A 2025 randomized trial by METR found experienced developers working on their own familiar projects took 19% longer with AI tools, even though they believed they were faster. METR's February 2026 follow-up found a smaller, uncertain effect, called it very weak evidence, and said developers are probably more sped up now. These are small studies of experts, not of beginners building new apps.
What went wrong in real life
Three public cases show the pattern. We cite what the sources say and flag what is disputed.
- An agent deleted a production database (July 2025). The founder of SaaStr reported that Replit's AI agent deleted a production database during a code freeze and made up data. Replit's CEO called it "unacceptable and should never be possible" and announced separate development and production databases. The lesson: never give an agent write access to live data.
- A missing access rule (CVE-2025-48757). The US vulnerability database records that insufficient row-level security policy in Lovable-generated sites allowed unauthenticated users to read or write database tables. The supplier disputes this, saying each customer is responsible for protecting their application's data. A researcher explained that the apps call the database straight from the browser and rely entirely on those rules, so missing or weak rules mean anyone can alter a request.
- A hardcoded key and no rules (February 2026). Security firm Wiz reported that a vibe-coded social site's database exposed about 1.5 million API tokens and around 35,000 email addresses, because a key was embedded in the site's public code and row-level security was not enabled. It was fixed within about three hours of contact. Wiz says the root cause was a single database setting.
Notice what these have in common: not exotic hacking, but basic settings left in an unsafe state, in apps nobody had reviewed. The Supabase documentation puts the rule plainly: enable row-level security on every table in an exposed schema, and never use the secret key in the browser.
7 checks before launch
This list is our own, built from the sources above. If an app holds customer data, ask an engineer to verify the first three.
- 1. No secrets in the codeOpen your site's public code and your code repository. Passwords, secret keys and tokens must not be there. Keep secret keys on the server only, which OWASP and Supabase both stress.
- 2. Access rules on every tableTurn on row-level security (or your platform's equivalent), then test as a logged-out visitor and as a different customer. Can you see anyone else's data? Broken access control is number one in the OWASP Top 10 for 2025.
- 3. A human reviews log-in and paymentsThe NCSC points to authentication, personal data and credentials as the areas that need manual oversight. Do not let the AI be the only reviewer.
- 4. Check what comes in, and what goes outInjection and cross-site scripting are common AI mistakes: Veracode's test saw the AI fail 86% of cross-site scripting cases. Make sure any text a user types is treated as data, not as a command. If your app uses an AI feature, read the OWASP Top 10 for LLM applications, which covers prompt injection and excessive agency.
- 5. Verify every packageA USENIX Security 2025 study of 576,000 code samples found models invent package names that do not exist, at least 5.2% of the time for commercial models and 21.7% for open-source ones. An attacker can register a fake package with that name. Before installing, check each dependency is real, well known and pinned to a version. Supply-chain failures are also on the OWASP list.
- 6. Separate production, and keep backups you have testedKeep the live database apart from your test one, make sure the AI agent cannot touch the live one, and practice restoring a backup.
- 7. Logging and error handlingRecord who did what, and make sure errors do not show secrets or internal details to visitors. Logging failures and mishandled errors are both on the OWASP 2025 list.
If you buy software from others, CISA's Secure by Design principles are a good set of questions to ask your supplier: do they take ownership of customer security outcomes, and are they open about flaws?
When it is fine, and when to get help
| Situation | Our view |
|---|---|
| A throwaway prototype or demo with fake data | Vibe away. This is what the technique is good at. |
| An internal tool for your team with no sensitive data | Usually fine. Run checks 1, 2 and 6. |
| A public site that collects enquiries | Run all seven checks. Have someone review the form handling. |
| Customer accounts, payments or health or financial data | Get an engineer to review before launch, and again after changes. |
If you handle personal data, a breach has legal costs as well as technical ones. See our guide to the EU AI Act and GDPR.
Questions people ask
What is vibe coding?
Collins Dictionary, which named it Word of the Year for 2025, defines it as the use of artificial intelligence prompted by natural language to write computer code. The term was coined by Andrej Karpathy in a February 2025 post, where he described accepting AI changes without reading them.
Is AI-generated code less secure than human code?
Studies disagree, and results depend on method. A 2021 academic study found roughly 40 percent of Copilot programs in its test scenarios were vulnerable. A Veracode vendor report in 2025 found OWASP Top 10 flaws in 45 percent of test cases. A 2025 preprint that scanned thousands of real GitHub files found most had no identifiable vulnerability. The safe reading: it can produce flaws, so check it.
Is it safe to put customer data in an app built with AI?
Only after a proper review. The UK NCSC advises moving toward manual oversight for authentication, sensitive personal data and secrets. If you cannot read and test the access rules yourself, ask an engineer to review them before launch.
What is row-level security and why does it matter?
It is a database feature that decides which rows each user may read or write. Supabase's documentation says to enable it on every table in an exposed schema, and that a table without it can be read and written by anyone with access. Several real incidents trace back to it being missing.
Are AI coding tools making developers faster?
The evidence is mixed. A 2025 randomized trial by METR found experienced developers on familiar projects took 19 percent longer with AI tools. METR's February 2026 follow-up found a smaller and uncertain effect, called it very weak evidence, and said it believes developers are likely more sped up now. Both studies are small, so treat them as signals.
Built a prototype with AI and want it production-ready?
Geneki reviews AI-built apps for security and reliability, fixes what is weak and helps you launch with confidence. Bring us what you have.
Talk to usSources
- Andrej Karpathy's post introducing vibe coding
- Collins Word of the Year 2025: AI meets authenticity
- Asleep at the Keyboard? Assessing the security of GitHub Copilot's code contributions
- Do users write more insecure code with AI assistants?
- AI-generated code poses major security risks in nearly half of all development tasks
- Security analysis of AI-attributed code in public GitHub repositories (preprint)
- The 'vibe coding spectrum' approach to AI-assisted software development
- CVE-2025-48757
- Row Level Security
- Exposed Moltbook database reveals millions of API keys
- Replit CEO responds to the SaaStr database deletion
- Introducing a safer way to vibe code with Replit Databases
- OWASP Top 10:2025
- OWASP Top 10 for LLM Applications
- We have a package for you! A comprehensive analysis of package hallucinations by code generating LLMs
- Secure by Design
- Measuring the impact of early-2025 AI on experienced open-source developer productivity
- Uplift update (METR)
- Our guide: running AI agents safely
This guide is general information, not a security audit. The studies cited use different methods and cannot be compared directly. The Replit and Lovable cases are summarized from public reports and the suppliers' statements, and the Lovable CVE is disputed by the supplier. The Moltbook finding is from Wiz, a security vendor. Have an engineer review any app that holds customer data.


