AI

Verifying AI-Generated Code: 76% of Developers Generate Faster Than They Can Review

76% of respondents generate AI code faster than they can verify it. Here is how to build an automated quality gate for AI code with SonarQube.

11 min read

According to a survey Sonar published in November 2026, AI creates or significantly assists an average of 65% of the code developers commit. A year earlier, that share was 42%. Code is therefore produced faster and faster, while verification fails to keep pace. This article is about verifying AI-generated code: where the process stalls, what is at stake for the business, and how to make verification automated and auditable. We are not arguing against AI. We are arguing that speed should come with predictable quality.

In brief

  • With AI assistants and agents, the volume of code grows faster than the capacity to verify it: 76% of respondents generate AI code faster than they can verify it.
  • Only 39% fully agree that AI code is always reviewed before commit (the act of recording code in the shared repository), even though 94% do not fully trust it.
  • AI code needs its own measurable rules, yet only 23% have well-defined, AI-specific guidelines or automated checks.
  • The solution is not more human review, but a uniform, automated quality and security gate at the point where the code is created.
  • SonarQube can provide this verification layer: AI Code Assurance and the SonarQube MCP Server put Sonar’s analysis alongside AI coding tools.

What has changed: code became cheap, trust became expensive

“Vibe coding” means that a developer describes in natural language what they want, and the AI writes the code. An AI agent goes one step further: it independently carries out multi-step tasks, modifies files and runs tests. Both can speed up work, which is why they are spreading.

Sonar’s 2027 State of Code Developer Survey report, published on 12 November 2026, surveyed 1,026 developers and development leaders. According to the results, the share of AI-generated or significantly AI-assisted code averages 65%. A year earlier, respondents expected 55% within one year and 65% within two years. They reached 65% in just one year, so reality moved faster than expectations. Of those surveyed, 34% expect their team to create or use an “agentic software factory” (a partly autonomous software factory made up of agents) within a year; today the figure is 5%.

An important note: this is Sonar’s own, self-reported survey, so it indicates direction rather than offering a laboratory measurement. Sonar is also the maker of SonarQube, which is worth keeping in mind. The same survey also shows that 76% of respondents use an AI coding tool for business-critical or mission-critical services. For a company, this means that not only internal prototypes are built this way, but also the software that customers build upon.

Where it stalls: the verification bottleneck

Imagine a factory where the production line runs twice as fast, but there is still only one quality inspector. The product ships out, but fewer items are checked. The same can happen with code.

Indicator (Sonar, November 2026)ValueWhat it means for a development team
Generate AI code faster than they can verify it76%The review queue gets longer, and more unreviewed changes pile up before release.
Spend more time on review than on writing code53% (18% before AI adoption)Developers’ time has shifted from writing to verification.
Fully agree that AI code is always checked before commit39% (48% a year ago)Verification discipline weakens under the load.
Do not fully trust AI code94%The distrust is justified, but without verification it solves nothing.

The last two rows together are the key point. Most developers know that AI code needs verification, yet fewer and fewer always verify it. This is probably not negligence but a scaling problem: a manual process struggles to keep up with the volume of code.

Risks and business impact

The biggest risk is that defects are not visible. In Sonar’s survey, 42% of respondents are very or extremely concerned that well-written AI code makes it harder to spot defects. AI code looks convincing even when its logic is wrong or it is vulnerable.

On the security side, Veracode’s 2025 GenAI Code Security Report examined more than 100 language models in Java, JavaScript, Python and C#. According to the results, AI-generated code introduced a risky security flaw in 45% of the tests. It also turned out that larger, newer models did not improve on this. For a company, this means you cannot wait for the next model version to solve the security question on its own.

The third area is measurability. In Sonar’s survey, only 36% of respondents say they measure the productivity impact of AI and can see the result, while 22% do not know what return AI coding has delivered. If you cannot see how much code is produced with AI and whether it passed verification, you cannot calculate the cost of later fixes either, and you cannot show evidence in an audit.

The business impact therefore appears in three places:

  • Incident risk: hidden defects and vulnerabilities come to light in production.
  • Cost of later fixes: technical debt (the compounding future cost of quality work postponed today) accumulates.
  • Auditability: there is no record of what was verified, what was found and what was fixed.

Practical steps: how to make AI code verified

Sonar’s report breaks “code trust” into four elements: intent, guiderails, verification and evidence. In the report’s formula, the four elements are multiplied, so if any one of them is zero, code trust is zero too. On intent, the survey shows that only 23% have well-defined, AI-specific guidelines or automated checks. These four elements are worth turning into concrete steps.

  1. Assess where AI code is produced. Compile a list of which teams and repositories use an assistant or an agent, and which projects contain AI-generated code.
  2. Define what “good code” means for you. Set quality and security expectations in numbers: coverage, defect level, duplication, vulnerabilities.
  3. Automate verification in CI. CI (continuous integration: a system that automatically runs and inspects every change) should check every pull request (a request to merge a change) before anyone merges it.
  4. Pass the expectations on to the AI tool as well. According to the survey, 54% of respondents already give agents context through MCP or a similar (retrieval) integration. This way, a defect can surface while the code is still being written.
  5. Block the release when the gate is red. Human review can then focus on logic, design and risky parts instead of mechanical errors.
  6. Keep the evidence. Record which project was checked with which rule set, what was found and what was fixed. This becomes the basis of the audit.

In Sonar’s survey, 77% of respondents said that strong verification tools increase their trust in AI code. At the same time, an average of 61% of AI code receives automated review, which means that on average nearly 40% of the code still goes without automated verification.

How SonarQube can help verify AI code

SonarQube uses static code analysis (examining code without running it) to find bugs, vulnerabilities and quality problems. For AI code, Sonar offers two separate tools. According to the official documentation (SonarQube Server 2026.5), the features are available as described below.

AI Code Assurance: see which projects contain AI code

AI Code Assurance works in three steps. First, it labels the project as containing AI-generated code. Second, it assigns an AI-qualified Quality Gate to it, that is, a set of conditions the code must pass. Third, if the project complies, an external badge can also be displayed. According to the documentation, this is included in the Developer, Enterprise and Data Center editions of SonarQube Server.

The documentation recommends a dedicated built-in gate for agentic development: Sonar way for agentic AI, which replaces the earlier Sonar way for AI Code gate (projects that use that gate are marked “legacy”). It sets six conditions on new code.

Condition on new codeThreshold
New bugs (Reliability)no new bug of Minor severity or higher
New vulnerabilities (Security)no new vulnerability of Minor severity or higher
Maintainability issues (code smells)no new issue of Major severity or higher
Dependency risksno new risk of Low severity or higher (requires a separate Advanced Security subscription)
Test coverageat least 80%
Duplicated codeat most 3%

If the subscription does not include SonarQube Advanced Security, the dependency risk condition appears greyed out and the gate skips it. The gate can be customized: you can copy it, modify its conditions, and also qualify your own gate for AI code. The point is that new code is held to the same standard and does not depend on how tired the available reviewer happens to be.

SonarQube MCP Server: Sonar alongside the AI assistant

MCP (Model Context Protocol) is an open connection standard that links AI tools to external systems. According to the documentation, the SonarQube MCP Server connects an AI coding agent to SonarQube’s quality and security data. The agent can, for example, analyze a code snippet or a file, query issues, and check the status of the Quality Gate, security hotspots (risky pieces of code that need review) and coverage. Supported clients include Claude Code, Cursor, GitHub Copilot CLI, GitHub Copilot Cloud Agent and VS Code. According to the documentation, the SonarQube Server-hosted MCP extension is available in the Developer, Enterprise and Data Center editions, with SonarQube Server 2026.3 or later.

The MCP Server is not an agent but a toolkit: the agent calls it, and SonarQube supplies the analysis and the standards. It therefore complements, but does not replace, the automated gate running in the pipeline.

Summary

AI assistants and agents can deliver real speed-ups, but the price of that speed is a heavier verification burden. According to the numbers, most teams produce code faster than they can review it, and only a few have AI-specific rules or an automated gate. The solution is to move verification to where the code is born: uniform rules, an automated gate, and preserved evidence.

If you would like to assess how AI-written code can be verified in your development process, Szitár-Net, a SonarSource Silver partner, can help with the assessment and the rollout. You can request a consultation or a custom quote at szitar@szitar.hu.

FAQ

What is vibe coding, and why does it need verification?

Vibe coding means that a developer asks the AI for code in natural language and often uses it with little manual review. Verification is needed because in Veracode’s 2025 study, AI-generated code contained a risky security flaw in 45% of the tests.

Is manual code review enough for AI code?

Less and less so. In Sonar’s 2026 survey, 76% of respondents generate AI code faster than they can verify it, and 53% spend more time on review than on writing code. Automated verification takes the mechanical errors off people’s plates.

What does AI Code Assurance mean in SonarQube?

It is Sonar’s workflow for projects that contain AI code: labeling the project, applying an AI-qualified Quality Gate, and optionally displaying an external badge. According to the documentation, it is part of the Developer, Enterprise and Data Center editions of SonarQube Server.

What is the SonarQube MCP Server for?

It connects an AI coding assistant to SonarQube. The assistant can then analyze code, query issues, and check the status of the Quality Gate or coverage from within the development environment.

What should I do with the figures when the source is Sonar itself?

Treat them as indicators of direction. Sonar’s survey is self-reported, so it is worth measuring on your own team as well: in how many projects there is AI code, and how much of it has passed automated verification.

Sources

  1. Sonar: State of Code Developer Survey Report (2027 edition, November 2026) – <https://www.sonarsource.com/the-state-of-code/developer-survey-report/>
  2. Sonar press release: Sonar releases its 2027 State of Code Developer Survey Report (12 November 2026) – <https://www.sonarsource.com/company/press-releases/sonar-releases-2027-developer-survey-report/>
  3. Veracode: 2025 GenAI Code Security Report – <https://www.veracode.com/resources/analyst-reports/2025-genai-code-security-report/>
  4. Sonar documentation: AI Code Assurance – <https://docs.sonarsource.com/agent-centric-development-cycle/ai-code-standards/ai-code-assurance.md>
  5. Sonar documentation: Set your AI standards (SonarQube Server 2026.5) – <https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/ai-code-assurance/overview.md>
  6. Sonar documentation: Quality gate for agentic AI – <https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/ai-code-assurance/quality-gate-for-agentic-ai.md>
  7. Sonar documentation: About the MCP Server – <https://docs.sonarsource.com/sonarqube-mcp-server/about-the-mcp-server.md>
  8. Sonar documentation: SonarQube Server-hosted MCP server – <https://docs.sonarsource.com/sonarqube-mcp-server/setup/sonarqube-server-hosted.md>
  9. Sonar documentation: SonarQube Server editions – <https://docs.sonarsource.com/sonarqube-server/discovering/sonarqube-server-editions.md>

About the editor

Dr. Kabai Márton Tamás

Dr. Kabai Márton Tamás, Owner and Managing Director, Szitár-Net Kft.

Back to all articles

Edited by

Dr. Márton Tamás Kabai

Managing Director, Szitár-Net Kft.

Managing Director of Szitár-Net Kft. The company has worked with automated source code analysis for more than 10 years and, as the official SonarSource partner in Hungary, helps banks, public institutions and large enterprises adopt SonarQube. His talks cover code quality, cybersecurity compliance and secure AI-assisted development.

More articles LinkedIn Work with us

Related articles

AI

AI writes the code. But who is going to check it?

AI-based development tools have become part of everyday software development. The question is no longer whether AI can write code, but how we check the volume of code we are producing ever faster.

Read on 5 min

SonarSource Partner