Overview of AI capabilities
SonarQube Server provides a series of tools to help you manage and use AI-generated code in your projects. Existing capabilities include:
- AI-generated fix suggestions,
- Quality gates and unique project badge support to AI Code Assurance,
- as well as unique project overview and portfolio labels to identify projects containing AI-generated code.
AI-generated fix suggestions
This feature is available in Early Access for all commercial editions of SonarQube Server.
When an Instance Admin enables AI CodeFix for your project, you can get an AI-generated fix suggestion for eligible issues. The suggestions are generated using OpenAI's GPT-4.
To enable the feature, see Enabling AI-generated fix suggestions in the administration section.
To learn how to use this feature, see Getting AI-generated fix suggestions on the Fixing issues page.
AI-generated fix suggestions are available for a select set of rules in Java, JavaScript, TypeScript, Python, C#, and C++.
Autodetect AI-generated code
Knowing if your project contains AI-generated code helps raise awareness of code ownership and code security. To help build this awareness, SonarQube Server can autodetect AI-generated code in projects on GitHub using GitHub Copilot. For the full details, see Autodetecting AI code in your project.
If turned on, the feature alerts Instance Admins when project contributors recently used GitHub Copilot so that such projects can be protected with Sonar’s AI Code Assurance.
AI Code Assurance
AI Code Assurance features help you make sure that the AI-generated code in your project is clean. A new recommended quality gate, Sonar way for AI Code, is available to use on projects. In addition, it’s possible to qualify any quality gate for AI Code Assurance and start using it on your projects to ensure security and code quality while boosting team productivity with AI tools.
To learn more about protecting AI-generated code in your project, see the Enabling AI Code Assurance on projects article on the Standards for AI-generated code page.
Ratings for AI Code Assurance projects in portfolios
Portfolios are available starting in Enterprise edition.
It's possible to view ratings for projects with AI Code Assurance in your portfolios. There, you will see a breakdown of projects, applications, and nested portfolios that include the standards you've set for AI-generated code. See the Portfolio breakdown article for more information.
Was this page helpful?