← All briefings Briefing

Secure-at-inception scanning for AI-generated code.

ai generated codesecurity scanningdevsecopsclaudesnyk

The proportion of AI-assisted code in production is now estimated at 65–70%. At the same time, analysis suggests that around 48% of AI-generated code contains vulnerabilities. The implication is clear: if security scanning remains a gate that code passes after it is written, organisations will spend increasing amounts of time finding and fixing flaws that could have been caught earlier. Secure-at-inception scanning moves the security check to the point where code is created.

Why timing matters

The cost of fixing a vulnerability rises sharply the later it is discovered. A flaw caught in the IDE costs minutes to fix. The same flaw found in production can cost days or weeks, plus incident response, customer notification and reputational damage. When a large share of code is generated by AI, the volume of potential flaws increases, which makes early detection even more valuable.

Secure-at-inception scanning means running security and quality checks while the developer is still working, before the code is committed. This gives immediate feedback and keeps the fix within the developer’s current context.

What secure-at-inception looks like

In practice, secure-at-inception scanning combines several layers:

IDE integration. Security scanners, static analysis tools and dependency checkers run inside the developer environment. When an AI assistant generates a function, the scanner evaluates it in real time.

Generation-time policy. The AI coding tool is configured with guardrails that discourage or block known risky patterns. For example, the assistant can be instructed not to generate code that constructs SQL strings through concatenation or that uses deprecated cryptography libraries.

Pre-commit checks. Before code is committed, automated checks enforce minimum standards. Any AI-generated change that introduces a new vulnerability or dependency issue is blocked until it is resolved or explicitly accepted.

Context-aware guidance. Rather than simply flagging issues, the scanner provides remediation guidance that the developer or assistant can act on immediately.

The role of deterministic tools

Deterministic security tools are particularly important for AI-generated code because they provide consistent, explainable results. A model reviewing another model’s output may miss issues or disagree with itself. A rules-based scanner applies the same checks every time, which makes it a reliable foundation for secure-at-inception workflows.

Organisational implications

Moving scanning left requires more than tooling. It requires policy, training and tolerance for short-term friction. Developers need to understand which findings are blocking and why. Security teams need to tune scanners to minimise false positives. Leadership needs to protect the time required to fix issues at inception rather than rewarding teams that ship fast and patch later.

The bottom line

AI-generated code is not inherently less secure than human-written code, but it is produced faster and in larger volumes. Without secure-at-inception scanning, the backlog of vulnerabilities will grow faster than teams can remediate it. The organisations that get ahead of this will treat every AI-generated suggestion as a candidate for immediate verification, not as a shortcut past security.

Related briefings

Keep reading.

More from the team

Longer thinking →

Briefings are short reads on the news. For Burt's own thinking, see the Journal.