DALL-E for coders? That’s the promise behind vibe coding, a term describing the use of natural language to create software. While this ushers in a new era of AI-generated code, it introduces “silent killer” vulnerabilities: exploitable flaws that evade traditional security tools despite perfect test performance.
A detailed analysis of secure vibe coding practices is available here.
TL;DR: Secure Vibe Coding
Vibe coding, using natural language to generate software with AI, is revolutionizing development in 2025. But while it accelerates prototyping and democratizes coding, it also introduces “silent killer” vulnerabilities: exploitable flaws that pass tests but evade traditional security tools.
This article explores:
- Real-world examples of AI-generated code in production
- Shocking stats: 40% higher secret exposure in AI-assisted repos
- Why LLMs omit security unless explicitly prompted
- Secure prompting techniques and tool comparisons (GPT-4, Claude, Cursor, etc.)
- Regulatory pressure from the EU AI Act
- A practical workflow for secure AI-assisted development
Bottom line: AI can write code, but it won’t secure it unless you ask, and even then, you still need to verify. Speed without security is just fast failure.
Introduction
Vibe coding has exploded in 2025. Coined by Andrej Karpathy, it’s the idea that anyone can describe what they want and get functional code back from large language models. In Karpathy’s words, vibe coding is about “giving in to the vibes, embrace exponentials, and forget that the code even exists.”
From Prompt to Prototype: A New Development Model
This model isn’t theoretical anymore. Pieter Levels (@levelsio) famously launched a multiplayer flight sim, Fly.Pieter.com, using AI tools like Cursor, Claude, and Grok 3. He created the first prototype in under 3 hours using just one prompt:
“Make a 3D flying game in the browser.”
After 10 days, he had made $38,000 from the game and was earning around $5,000 monthly from ads as the project scaled to 89,000 players by March 2025.
But it’s not just games. Vibe coding is being used to build MVPs, internal tools, chatbots, and even early versions of full-stack apps. According to recent analysis, nearly 25% of Y Combinator startups are now using AI to build core codebases.
Before you dismiss this as ChatGPT hype, consider the scale: we’re not talking about toy projects or weekend prototypes. These are funded startups building production systems that handle real user data, process payments, and integrate with critical infrastructure.
The promise? Faster iteration. More experimentation. Less gatekeeping.
But there’s a hidden cost to this speed. AI-generated code creates what security researchers call “silent killer” vulnerabilities, code that functions perfectly in testing but contains exploitable flaws that bypass traditional security tools and survive CI/CD pipelines to reach production.
![]() |
Sources: Y Combinator research | GitGuardian research | Stanford University research |
The Problem: Security Doesn’t Auto-Generate
The catch is simple: AI generates what you ask for, not what you forget to ask. In many cases, that means critical security features are left out.
The problem isn’t just naive prompting, it’s systemic:
- LLMs are trained to complete, not protect. Unless security is explicitly in the prompt, it’s usually ignored.
- Tools like GPT-4 may suggest deprecated libraries or verbose patterns that mask subtle vulnerabilities.
- Sensitive data is often hardcoded because the model “saw it that way” in training examples.
- Prompts like “Build a login form” often yield insecure patterns: plaintext password storage, no MFA, and broken auth flows.
According to this new Secure Vibe Coding guide, this leads to what they call “security by omission”, functioning software that quietly ships with exploitable flaws. In one cited case, a developer used AI to fetch stock prices from an API and accidentally committed their hardcoded key to GitHub. A single prompt resulted in a real-world vulnerability.
Here’s another real example: A developer prompted AI to “create a password reset function that emails a reset link.” The AI generated working code that successfully sent emails and validated tokens. But it used a non-constant-time string comparison for token validation, creating a timing-based side-channel attack where attackers could brute-force reset tokens by measuring response times. The function passed all functional tests, worked perfectly for legitimate users, and would have been impossible to detect without specific security testing.
Technical Reality: AI Needs Guardrails
The guide presents a deep dive into how different tools handle secure code, and how to prompt them properly. For example:
- Claude tends to be more conservative, often flagging risky code with comments.
- Cursor AI excels at real-time linting and can highlight vulnerabilities during refactors.
- GPT-4 needs specific constraints, like:
- “Generate [feature] with OWASP Top 10 protections. Include rate limiting, CSRF protection, and input validation.”
It even includes secure prompt templates, like:
# Insecure "Build a file upload server" # Secure "Build a file upload server that only accepts JPEG/PNG, limits files to 5MB, sanitizes filenames, and stores them outside the web root."
The lesson: if you don’t say it, the model won’t do it. And even if you do say it, you still need to check.
Regulatory pressure is mounting. The EU AI Act now classifies some vibe coding implementations as “high-risk AI systems” requiring conformity assessments, particularly in critical infrastructure, healthcare, and financial services. Organizations must document AI involvement in code generation and maintain audit trails.
Secure Vibe Coding in Practice
For those deploying vibe coding in production, the guide suggests a clear workflow:
- Prompt with Security Context – Write prompts like you’re threat modeling.
- Multi-Step Prompting – First generate, then ask the model to review its own code.
- Automated Testing – Integrate tools like Snyk, SonarQube, or GitGuardian.
- Human Review – Assume every AI-generated output is insecure by default.
# Insecure AI output: if token == expected_token: # Secure version: if hmac.compare_digest(token, expected_token):
The Accessibility-Security Paradox
Vibe coding democratizes software development, but democratization without guardrails creates systemic risk. The same natural language interface that empowers non-technical users to build applications also removes them from understanding the security implications of their requests.
Organizations are addressing this through tiered access models: supervised environments for domain experts, guided development for citizen developers, and full access only for security-trained engineers.
Vibe Coding ≠ Code Replacement
The smartest organizations treat AI as an augmentation layer, not a substitute. They use vibe coding to:
- Accelerate boring, boilerplate tasks
- Learn new frameworks with guided scaffolds
- Prototype experimental features for early testing
But they still rely on experienced engineers for architecture, integration, and final polish.
This is the new reality of software development: English is becoming a programming language, but only if you still understand the underlying systems. The organizations succeeding with vibe coding aren’t replacing traditional development, they’re augmenting it with security-first practices, proper oversight, and recognition that speed without security is just fast failure. The choice isn’t whether to adopt AI-assisted development, it’s whether to do it securely.
For those seeking to dive deeper into secure vibe coding practices, the full guide provides extensive guidelines.
Security-focused Analysis of Leading AI Coding Systems
AI System | Key Strengths | Security Features | Limitations | Optimal Use Cases | Security Considerations |
OpenAI Codex / GPT-4 | Versatile, strong comprehension | Code vulnerability detection (Copilot) | May suggest deprecated libraries | Full-stack web dev, complex algorithms | Verbose code may obscure security issues; weaker system-level security |
Claude | Strong explanations, natural language | Risk-aware prompting | Less specialized for coding | Doc-heavy, security-critical apps | Excels at explaining security implications |
DeepSeek Coder | Specialized for coding, repo knowledge | Repository-aware, built-in linting | Limited general knowledge | Performance-critical, system-level programming | Strong static analysis; weaker logical security flaw detection |
GitHub Copilot | IDE integration, repo context | Real-time security scanning, OWASP detection | Over-reliance on context | Rapid prototyping, developer workflow | Better at detecting known insecure patterns |
Amazon CodeWhisperer | AWS integration, policy-compliant | Security scan, compliance detection | AWS-centric | Cloud infrastructure, compliant envs | Strong in generating compliant code |
Cursor AI | Natural language editing, refactoring | Integrated security linting | Less suited for new, large codebases | Iterative refinement, security auditing | Identifies vulnerabilities in existing code |
BASE44 | No-code builder, conversational AI | Built-in auth, secure infrastructure | No direct code access, platform-limited | Rapid MVP, non-technical users, business automation | Platform-managed security creates vendor dependency |
The complete guide includes secure prompt templates for 15 application patterns, tool-specific security configurations, and enterprise implementation frameworks, essential reading for any team deploying AI-assisted development.
Found this article interesting? This article is a contributed piece from one of our valued partners. Follow us on Twitter and LinkedIn to read more exclusive content we post.
Leave feedback about this