Set your AI standards
This section explains how to manage AI standards, including the use of tools for Sonar’s AI Code Assurance in your SonarQube Server project.
Sonar’s AI Code Assurance helps you ensure security and code quality within projects containing AI-generated code. By utilizing project labels, custom quality gate certification and marking, and dynamic project badge publishing, you can maintain high standards and confidently assure the quality of your AI projects.
Assuring your AI code
SonarQube Server recognizes that AI-generated code should be monitored with additional quality standards. Recommended checks include high standards to reduce code complexity, remove bugs, and eliminate injection vulnerabilities. SonarQube’s AI Code Assurance features bring confidence that your AI-generated code is being reviewed to avoid any accountability crisis.
These objectives are achieved with three features that allow Quality Standard administrators to qualify projects as AI Code Assured:
Publish an AI Code Assurance badge externally to your websites to Monitor projects with AI code.
Labeling projects with AI code
The first step to achieving AI Code Assurance is to mark your project as containing AI code.
Go to Project settings > AI-generated code and activate the Contains AI-generated code setting. Projects marked in this way will have the label shown on the Projects page, on the Main branch Overview page, and on the Project Information pages.
Apply a quality gate for AI Code Assurance
Step 2 in achieving AI Code Assurance requires that an AI-qualified quality gate be applied to your project. While you are in Your Project > Project Settings > Quality Gate, select a qualified quality gate from the list.
See the Quality gates for AI code page for more information about qualifying your custom quality gate for AI Code Assurance. In addition, the Set up AI Code Assurance page has information about using the API to setup AI Code Assurance.
Monitor projects containing AI code
Projects marked with the label and using a quality gate qualified for AI Code are eligible to publish the
badge on your external websites. For information about using the AI Code Assurance badges, please see the Monitor projects with AI code page.
Related pages
Overview of AI capabilites
Overview of AI features for instance administration
The Set up AI Code Assurance page has information about using the API for AI Code Assurance
Learn about howAutodetect AI code works
See the Getting AI-generated fix suggestions to use AI CodeFix
See the Managing custom quality gates page for standard instructions to create a new quality gate
Last updated
Was this helpful?