A developer opens the IDE, describes what they want in plain English, and watches an AI agent write the feature in the time it takes to get coffee. It compiles. It passes the manual click-through. It ships. Nobody asked whether it was secure, because nobody asked much of anything. The prompt replaced the pull request, and “it works” replaced “I reviewed it.” That is vibe coding, and it is not a fringe habit anymore. It is how a growing share of production code gets written, by professional teams, not just hobbyists experimenting with a weekend app. And it’s exactly why vibe coding security has become the conversation every engineering and security leader is having, whether they’ve named it yet or not.
What “vibe coding” actually means
Vibe coding is software development where a person describes the desired outcome in natural language and an AI model, or an agent built on one, generates the working code. The person steers by outcome (“build a login flow,” “add a CSV export”) rather than by writing or line-by-line reviewing the implementation. The term caught on because it captures something real: the developer is going on the vibe that the output is right, not on a read of the code itself.
That shift is the whole story. Code review used to be a checkpoint built into how software got written. Vibe coding routes around it by design. Speed goes up. The habit of asking “what does this actually do” goes down.
Why “it works” is the wrong bar
“It works” means the code did what was asked, in the scenario that was tested. It says nothing about what the code does in scenarios nobody asked about: a malformed input, an authenticated user probing an endpoint that trusted them too much, a dependency that was never checked, a hardcoded secret sitting in plain sight. This is where vibe coding security breaks down before anyone even notices there’s a problem.
AI coding models are trained to produce functional output that matches the intent of a prompt. Security is not the objective function. A model optimizing for “this satisfies the request” will happily generate a query built with string concatenation instead of parameters, an endpoint with no access control because the prompt never mentioned who shouldn’t have access, or an API call that trusts a response it should validate. It compiles. It works. It also introduces the same vulnerability classes AppSec teams have spent a decade training developers out of, generated at a pace no manual review process was built to match.
Internal research on AI-generated code puts real numbers behind the intuition: a meaningful share of what agentic coding tools produce contains an exploitable security flaw on first pass, before any review happens at all. That is not a defect in one model. It is the expected output of optimizing for “it runs,” not “it holds up,” and it’s the exact gap vibe coding security has to close.
The risk surface is wider than the code itself
Vibe coding security is often framed as a code-quality problem, but the exposure runs through the whole workflow the agent touches, not just the function it writes:
| Top Vibe Coding Security Risks | What It Means | Potential Impact |
|---|---|---|
| Insecure Code Patterns and Logic Flaws | The model reproduces vulnerable patterns it learned from: missing input validation, weak crypto, unsafe deserialization | OWASP Top 10 vulnerabilities reach production undetected |
| Exposed Secrets and Sensitive Data | Generated code hardcodes API keys, tokens, or credentials as if they were placeholder syntax | Credential theft, lateral movement, data breaches |
| Vulnerable or Hallucinated Dependencies | The agent picks a package with known CVEs, or names one that doesn't exist yet and attackers register it first | Supply chain compromise via malicious or slopsquatted packages |
| Weak Authentication and Access Controls | Auth and permission logic ships with insecure defaults because the prompt never specified who shouldn't have access | Account takeover, unauthorized data access |
| Excessive Agent Permissions and Limited Oversight | Coding agents run with broad repo, install, or execution access and little human checkpoint | Unintended changes, data exposure, untracked risk |
| Instruction Hijacking via Config and Rules Files | Skill files, rules files, and MCP configs are reviewed like documentation but can silently redirect what an agent does | Agents executing attacker-controlled instructions without a code change ever appearing in a diff |
| Loose or Inherited Configurations | Debug modes, permissive CORS, verbose error messages, defaults nobody consciously chose | Information disclosure, expanded attack surface |
| Shadow AI Usage | Developers adopt coding assistants, MCP servers, or agent tools outside any approved or inventoried list | No visibility into what's touching the codebase, no way to govern it |
| Skipped or Rubber-Stamp Review | The root cause underneath all of the above: "it works" gets accepted as sign-off, so the checkpoint that used to catch these issues never fires | Every risk above compounds silently until something breaks in production |
Why traditional AppSec tooling lags here
Most application security tooling was built around a rhythm: code gets written, then it gets scanned, in CI or at the PR. That rhythm assumes there is a stable, human-authored artifact to point a scanner at, and that the volume of change is something a pipeline can review deliberately.
Vibe coding breaks the timing, and that timing gap is the core of the vibe coding security problem. Code changes inside the IDE in seconds, often before it ever reaches a pull request. A scanner that only runs in CI catches the problem after the fact, once the insecure pattern is already merged, already part of the next feature someone else is building on. And a scanner that treats AI-generated code the same as any other code misses the parts of the risk that are specific to how it got written: the package the agent chose without being asked to justify it, the instruction file that told the agent what to do before a human ever saw a diff.
What actually closes the gap
The organizations getting ahead of this are not slowing down vibe coding. They are building real vibe coding security into the workflow: moving the checkpoint back to where the code is actually written, and treating AI-generated code as untrusted input until proven otherwise:
- Scan inside the IDE, not just in CI. Catching an insecure pattern while the agent is still generating the function is a different problem than catching it after three more features depend on it.
- Validate every dependency an agent introduces, the same way you would validate one a developer typed manually, before it installs.
- Treat configuration files an agent reads as code, not documentation. Rules files, skill files, and MCP server configs can carry instructions that change what an agent does, and they deserve the same scrutiny as the code that agent produces.
- Keep a human in the loop for the fix, not just the flag. A developer who can see why something is exploitable, not just that it triggered a rule, actually learns to prompt and review differently next time.
- Assume “it works” was never the security bar, and make the actual bar visible in the workflow instead of leaving it to memory.
Where Xygeni fits
This is exactly the seam Xygeni’s DevAI was built to close. DevAI runs as a continuous security layer inside the IDE, watching human-written and AI-generated code as it’s produced, not after it lands in a pull request. It doesn’t wait for a prompt: it flags exploitable patterns, explains the real attack path in plain language, and proposes a fix the developer can review and apply without leaving their flow. On the supply chain side, MEW (Malware Early Warning) catches malicious packages before a signature exists, which matters directly here, since an agent choosing a dependency on your behalf is exactly the moment a slopsquatted or compromised package gets a way in.
Underneath both, CoreAI correlates what’s found across the codebase, dependencies, and pipeline into one prioritized risk view, and that view isn’t limited to Xygeni’s own scans. It applies the same AI triage, explanation, and remediation to findings from other scanners that are already in place, so securing vibe coding doesn’t mean ripping out a stack that already works. It means putting a layer over it that finally moves at the speed the code is now being written.
FAQ
Is vibe coding inherently insecure?
No. Vibe coding is a development method, not a vulnerability. The risk comes from skipping the review step that used to catch insecure patterns, not from using AI to write code in the first place. That’s why vibe coding security is a workflow discipline, not a reason to avoid the practice.
Can existing SAST or SCA tools catch vibe coding security risks?
They catch some of it, but usually after the code has already merged, since most run in CI rather than inside the IDE where the code is generated. They also typically don’t evaluate the AI agent’s own behavior, such as the packages it chooses or the configuration files it reads.
What’s the single highest-leverage fix for vibe coding security?
Move security checks into the IDE, at the point of generation, rather than relying only on a later pipeline scan. Catching an issue before it’s part of the next three features built on top of it is a different problem than catching it afterward.
Does securing vibe coding mean slowing developers down?
Not if the check happens inline, in the IDE, with an explanation and a ready fix. The goal is to keep the speed vibe coding offers while restoring the judgment that manual review used to provide.





