Autodetect AI code
SonarQube can autodetect the likelihood of AI-generated code in your projects on GitHub using GitHub Copilot.
Knowing if your project contains AI-generated code helps raise awareness of code ownership and code security. To help build this awareness, SonarQube Cloud can autodetect AI-generated code in projects using GitHub Copilot.
- If turned on, the feature alerts Project Admins when project contributors recently used GitHub Copilot. 
- If Copilot usage is detected, Project Admins can implement the tags and quality gates associated with your team’s AI Code Assurance profile to better call out projects that contain AI code. 
Autodetect AI-Generated Code is turned on by default in SonarQube Server, but your GitHub App must have the appropriate permissions in order to allow communication with SonarQube Server.
For full details about the feature including instructions and requirements, see Autodetect AI code page.
If you’re a GitHub Admin and want more information about the required permission levels in GitHub, see Permissions for AI autodetect.
Related pages
- Overview of AI capabilities 
- Learning about AI CodeFix to get AI-generated fix suggestions 
- An Overview to setup AI features for instance administration 
Last updated
Was this helpful?

