Our AI Generates PRs Faster Than Security Scans Can Run—Are We Creating Vulnerability Windows We Don’t Even See?
Okay, I need to share something that’s been keeping me up at night. ![]()
Three months ago, our engineering team adopted GitHub Copilot and Cursor across the board. The productivity gains were immediate—our PR volume tripled in the first month. Developers were shipping features faster than ever, and leadership was thrilled.
But here’s what nobody anticipated: our security scans couldn’t keep up.
The Problem We Didn’t See Coming
Our SAST security scans typically took 5-8 minutes to run. When we had ~10 PRs per day, that was fine. Now we’re averaging 30+ PRs daily, and we’ve created a queue. PRs are waiting 20-30 minutes just to get scan results back.
And here’s the scary part: developers started merging before scans completed because “it’s just a small change” or “I need to unblock the team.”
Last week, we discovered 2 vulnerabilities that shipped to staging—both would have been caught by our security scans if anyone had waited for them to finish. One was a SQL injection risk in a “quick fix” that an AI assistant generated. The other was missing input validation in an API endpoint.
The AI Speed vs Security Dilemma
This feels like a fundamental mismatch. AI coding assistants work at machine speed—one of our engineers told me his AI pair programmed through 15 function variations in the time it used to take him to write 2. But our security infrastructure still runs at “human developer” speed.
I’ve been researching this, and the data is alarming:
- A Stanford/MIT 2026 study found that 14.3% of AI-generated code contains security vulnerabilities vs 9.1% for human-written code
- DryRun Security reported that 87% of AI-generated PRs contained at least one vulnerability
- We’re generating more code faster, but it’s objectively less secure
So What Do We Do?
I see a few options, and honestly none of them are perfect:
Option 1: Slow down AI adoption to match our security tooling capacity
- Pro: No vulnerability windows
- Con: Feels like we’re fighting progress, and developers will resist
Option 2: Upgrade to real-time security validation
- Pro: Keeps pace with AI code generation
- Con: Expensive (~$40/dev/month), and I’m not sure it catches everything
Option 3: Accept brief vulnerability windows as the new normal
- Pro: Maintain development velocity
- Con: This feels incredibly irresponsible, especially for production code
Option 4: Hybrid approach - real-time for critical paths, async for everything else
- Pro: Balances speed and security
- Con: Complex to implement, requires risk classification
The Design Leader’s Take
From my perspective, this is a classic system design problem—we’ve optimized one part of the system (code generation) without considering the downstream effects (security validation). It’s like making a component library with beautiful UI but forgetting about accessibility—the speed doesn’t matter if the foundation is broken.
But I also know that telling engineers “slow down and wait for security scans” won’t work. We need to design systems that make the secure path the easy path, not the friction-filled path.
What I’m Asking This Community
How are you handling this mismatch between AI code generation speed and security scanning speed?
- Have you implemented real-time security validation? What works?
- Are you accepting some level of vulnerability windows? How do you manage that risk?
- Have you found ways to make security scanning faster without compromising thoroughness?
- Is anyone successfully using risk-based approaches (different security levels for different code)?
I’ve looked at tools like Snyk, Checkmarx, and GitGuardian MCP, and they all promise real-time validation. But I want to hear from people actually running this in production—not just vendor marketing.
The irony isn’t lost on me that we’re using AI to code faster, which creates security risks, which we then try to solve with more AI-powered security tools. ![]()
![]()
Is this sustainable? Or are we creating a vulnerability debt we’ll regret?
Would love to hear how other teams are navigating this. Especially if you’ve found approaches that don’t require choosing between speed and security.
![]()
Maya