AI
Agustín Sánchez • 03 DEC 2026
Vibe Coding Security: Why Engineering Still Matters

Anyone can build software now. Not everyone can keep it standing.
Today, anyone who knows how to use a computer can vibe code a working system in an afternoon. Describe the app, let an agent write it, deploy it. That is real progress, and it is not going away.
But a system that works is not a system that is secure. This is the central challenge of vibe coding security. The same AI that lets a non-engineer ship a product also lets an attacker find its weaknesses faster than ever. Attacks are getting cheaper, faster, and more frequent, and they target businesses with exposed endpoints, not only the big ones.
This is where engineering still matters. As engineers, we use agents every day too. The difference is that we know what to ask for, we know what to verify, and we know how to respond when something breaks. In the agentic era, that difference can determine whether a business survives an attack or goes down with it.
How AI is changing the cybersecurity threat landscape
AI has significantly lowered the cost of attacking a system. Tasks that used to need a skilled specialist and weeks of work can now run as automated pipelines:
- Vulnerability discovery. Models read source code, API responses, and error messages, and spot weaknesses in minutes.
- Exploit writing. Turning a known CVE into a working exploit no longer needs to take days.
- Mass scanning. Attackers can scan thousands of systems and hit whatever is exposed, without having to pick targets carefully.
- Social engineering. Phishing messages can now be personalized, well written, and in the target’s language.
The key shift is volume. An attack that was not worth the effort against a small company may now be worth it, because it costs much less to run. Being small is no longer a defense.
The frontier labs see this too. Anthropic chose not to release Claude Mythos Preview to the public. Access was limited to a group of trusted organizations through Project Glasswing, largely because of what the model can do in cybersecurity. When the companies building these models restrict them for security reasons, the threat is not hypothetical.
AI agent security risks: Our agents are part of the attack surface
The risk is not only that attackers use AI. The way we build software with AI opens new doors on its own.
- Prompt injection. An agent that reads issues, docs, web pages, or emails can receive hidden instructions inside that content and execute them with your permissions.
- Hallucinated dependencies. Agents sometimes suggest packages that do not exist. Attackers can register those names on npm and wait for someone to install them.
- Third-party skills and MCP servers. They can get access to your context, your files, and your tools. Teams may install them without the review they would give any other dependency.
- Code that works but is not safe. Agents write code that passes the happy path. Weak authorization, incomplete input validation, and hardcoded secrets can slip through when nobody checks.
- Over-permissioned agents. An agent with production credentials and unrestricted shell access is an attractive target. Compromising the agent can compromise the system.
A vibe coder may not see most of these risks, because nothing fails. The app runs, the demo works, and the vulnerability stays invisible until someone exploits it.
Why the security of AI-generated code still requires engineers
Agents do not remove the need for engineers like us. They change where we spend our effort. In AI software development, writing code is no longer the only bottleneck. Knowing what the code should do, and proving that it does only that, is increasingly important.
Ensuring the security of AI-generated code requires knowing:
- What to ask for. Authorization on every endpoint, tenant isolation, rate limiting, input validation, secret management. If you do not know these exist, you may not ask for them, and you cannot assume the agent will add them on its own.
- What to verify. Reading a diff and spotting the missing permission check. Knowing which tests prove a security property and which only prove the happy path.
- How the system fails. Threat modeling before building: who could abuse this feature, what data it exposes, what happens if a dependency is compromised.
- How to respond. When a vulnerability is disclosed or an attack starts, someone has to understand the system well enough to patch it in hours, not weeks.
None of this is new knowledge. It is what serious software engineering has always required. What changed is the cost of skipping it. Before, an insecure system might go unnoticed for years. Now, automated attacks can find it in days.
8 best practices for secure AI coding
Our answer is not to slow down or stop using agents. It is to build security into the agentic loop, so that review scales at the same speed as code production.
1. Add a security reviewer to every PR. Make security-focused AI code review part of every pull request. Run an AI agent with a custom security skill (based on OWASP and your own stack patterns). Back it with automated SAST, dependency scanning, and secret scanning in CI, using tools like Semgrep, CodeQL, Dependabot, and Gitleaks.
2. Threat model in plan mode. Before building anything sensitive (auth, payments, file uploads, multi-tenant data), ask the agent to list the attack vectors. It can take just a few minutes and help prevent expensive mistakes.
3. Treat skills and MCP servers as dependencies. Review them before installing, pin their versions, and keep a team-approved list.
4. Apply least privilege to agents. No production credentials in agentic sessions. Run execution in sandboxes or containers. Require human confirmation for destructive actions or anything that sends data out.
5. Lock down the supply chain. Commit lockfiles, use npm ci, disable install scripts where possible, and check that any package an agent suggests actually exists and has a real history.
6. Keep secrets out of code and context. Use a secrets manager, scan for leaks, and rotate anything that might have been exposed.
7. Patch fast. Critical dependency updates cannot wait for the next sprint. The window between disclosure and exploitation keeps shrinking.
8. Get the fundamentals right. Authorization on every endpoint, rate limiting, useful logs, and tested backups. AI does not change these rules. It only punishes teams that ignore them faster.
The future of security in AI software development
Both sides are automating, and the pace will likely increase. Attacks are becoming more automated, and the time to react may drop from weeks to days, and in many cases to hours. Manual security reviews alone will struggle to keep up.
The good news is that defenders have a structural advantage. We know our systems, our code, and our business context. A team that uses agents to audit, test, and patch continuously is better positioned to respond quickly to emerging threats.
The teams most at risk will be two kinds:
- Owners of unmaintained software, where nobody is watching dependencies or reviewing new code.
- Teams that use AI only to produce more code, without a review loop that scales at the same speed.
The gap between teams that build security into their agentic workflow and teams that do not is likely to grow.
Vibe coding security: why human oversight matters
Vibe coding lowered the barrier to building software. It did not lower the barrier to running software safely. A data breach, a ransomware attack, or a week of downtime can take down an entire business.
Understanding vibe coding security risks is essential for anyone building software with AI.
Use agents. Use them everywhere. But keep engineers in charge of what the agents build. That is our job: knowing what to ask for, verifying what comes back, and responding fast when something goes wrong. In the agentic era, that is what separates a product from a liability.
Building a product with AI? Learn how our custom software development services can help you bring it to production with engineering expertise throughout the development process.
