Clarification Needed on AI Code Assurance in SonarQube - 2026.1.0

Hi Team,

We are testing AI Code Assurance in SonarQube 2026.1.0 and need clarification on how this feature is expected to work.

  1. SonarQube provides a built‑in “Sonar way for AI Code” Quality Gate with predefined conditions.

  2. We can also create our own Quality Gate and mark it as “Qualified for AI Code Assurance” even if the conditions differ from the built‑in one.

Our questions:

  • What AI‑specific logic is actually applied when a Quality Gate is marked as “AI Code Assurance”?

  • Does SonarQube perform any additional AI‑related checks, or is it simply enforcing standard metric conditions?

  • Is AI Code Assurance only responsible for detecting and labeling AI‑generated code, or does it influence the Quality Gate evaluation as well?

Important:
As per SonarQube document for ai code assurance, We labeled our project as “Contains AI Code,” applied the built‑in Sonar way for AI Code OR custom AI‑qualified gates, and added intentionally AI‑generated code — but SonarQube did not flag or detect any AI‑generated code in the files. No AI‑specific issues or indicators appeared. Only it detected code smells which are related to language specific which usually it detects.

So we would like to understand:

  • What triggers the detection of AI‑generated code?

  • Are there limitations in 2026.1.0 or specific requirements for AI detection to work?

  • Or is this feature simply limited to letting us manually label a project as AI‑generated code, without performing any actual AI‑specific detection?

Raising this query again to get the attention as earlier queryis not yet answered even after 16 days .

Thanks in advance for your help!

@ganncamp , @wayne.khan Could you please assist here with this query ?

Hi,

I’ve flagged this for the PMs. Hopefully they’ll be along soon.

 
Ann

Hi Rahul,

When you qualify a quality gate for AI Code Assurance, sonar is not doing any special checks on such gates. The gate is enforced. But displays an AI Code assurance badge to recognize that an appropriate standard qualified by the organization is applied.

How detection of AI code works:

SonarQube checks if Copilot usage and code checkin is correlatable. If yes, Sonarqube flags the project as presence of AI code detected. Please note that this feature is deprecated in SonarQube Server 2026.1. This feature will be removed in a later release.

We will share more information on new features and changes regarding AI Code Assurance soon.