Home/Blog/Opinion
OpinionFebruary 14, 20267 min read

AI Is Writing Our Code — Who's Checking the Security?

As AI-generated code ships to production faster than ever, a critical gap is emerging between development speed and security review.

The productivity gains are real. AI coding assistants help developers ship features in hours that used to take days. Entire applications get built in weekends. The barrier to creating software has never been lower.

But here's the question nobody seems to be asking loudly enough: who's reviewing all this AI-generated code for security?

The Speed-Security Gap

Before AI assistants, the development cycle had natural checkpoints. Code reviews happened because merging took time. Security considerations came up because architecture discussions were part of planning. Testing was thorough because shipping was slow.

Now the cycle looks different:

1. Describe what you want

2. AI generates the code

3. It works

4. Ship it

Steps 2 through 4 can happen in minutes. And in that compressed timeline, security review often gets squeezed out entirely.

This isn't about AI writing bad code. AI-generated code is often syntactically correct, functionally sound, and follows established patterns. The issue is that "working code" and "secure code" are not the same thing.

Common Security Issues in AI-Generated Code

Environment Variable Mishandling

When you ask an AI to "connect to the database" or "call the Stripe API," it puts credentials wherever they need to go to make things work. Sometimes that's a client-side file. Sometimes it's a publicly accessible config. The AI is optimizing for functionality, not for your deployment architecture's security model.

Overly Permissive Configurations

AI tends to generate code that works with the fewest restrictions. CORS set to *. Database queries without input sanitization. API endpoints without authentication. These are reasonable choices for getting something running quickly — and dangerous choices for production.

Dependency Trust

AI frequently suggests installing packages to solve problems. It doesn't evaluate whether those packages are maintained, trustworthy, or necessary. Every dependency is an expansion of your attack surface.

Pattern Repetition

AI models are trained on massive codebases, including code with known vulnerabilities. They can reproduce insecure patterns that were common in the training data — like using MD5 for password hashing, or constructing SQL queries with string concatenation.

Why Traditional Review Doesn't Scale

"Just do a security review" sounds simple. In practice, the economics don't work for AI-speed development:

Code reviews assume a human reads every line. When AI generates 500 lines of functional code in a minute, the review bottleneck becomes untenable. Do you spend an hour reviewing code that took a minute to generate? Static analysis tools catch known patterns but miss context-dependent issues. They don't know that your NEXT_PUBLIC_ variable is actually a secret that shouldn't be public. Penetration testing happens periodically — quarterly at best. AI-generated code ships daily. The gap between testing cycles means vulnerabilities can be live for months. Security training teaches developers to write secure code. But when the AI is writing the code, the developer's security knowledge doesn't automatically transfer to the output.

Runtime Detection: The Missing Layer

Here's where I think the industry needs to catch up: we need security tools that check what actually runs in the browser, not just what exists in source code.

The browser is the moment of truth. It's where environment variables are resolved, where bundles are assembled, where third-party scripts actually execute. Everything that matters for client-side security is visible in the browser.

This is exactly why I built vibeGuard as a browser extension rather than yet another CI tool:

  • It sees the final output. Not source code, not build artifacts — the actual running application.
  • It catches what bundlers create. Secrets that only appear after build-time variable substitution.
  • It detects third-party behavior. Scripts loaded at runtime that no static analysis would catch.
  • It works instantly. No pipeline to configure, no scans to schedule.

A Workflow for the AI Era

I'm not arguing against AI-assisted development. I use it every day. vibeGuard itself was built with AI assistance. The productivity gains are transformative and here to stay.

What I'm arguing for is a security workflow that matches the speed of AI development:

1. Generate with AI

Use AI to build features, write components, set up integrations. Stay in the flow. Trust the vibe.

2. Review the Critical Parts

Focus human review on authentication, authorization, data handling, and payment flows. Don't try to review everything — review what matters.

3. Scan Before You Ship

Run vibeGuard on your staging or production environment. It takes 10 seconds and catches the things that slip through — exposed secrets, missing headers, unexpected trackers, insecure form configurations.

4. Monitor Continuously

Security isn't a one-time check. Dependencies update, features change, new code gets generated. Make runtime scanning a regular part of your workflow.

The Opportunity

We're at an interesting inflection point. AI is dramatically lowering the barrier to creating software. Millions of new applications will ship in the next few years, built by people who might not have traditional security training.

This isn't a crisis — it's an opportunity. The tools for securing AI-generated code should be as accessible and easy to use as the AI itself. No enterprise contracts. No complex configurations. No security expertise required.

Install a browser extension. Click an icon. See what's wrong. Fix it.

That's the security experience developers deserve. That's what we're building with vibeGuard.

AI securityvibe codingLLM vulnerabilitiescode generation

Check your app's security in 10 seconds

vibeGuard is a free Chrome extension that scans for exposed secrets, trackers, and missing security headers.

Install vibeGuard — Free