# Autodetect AI code

{% hint style="warning" %}
Autodetect AI code has been deprecated in SonarQube Server 2026.1 and will be dropped in a subsequent release.
{% endhint %}

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 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](https://docs.sonarsource.com/sonarqube-server/instance-administration/ai-features/autodetect-ai-code "mention") page.

If you’re a GitHub Admin and want more information about the required permission levels in GitHub, see [permissions-for-ai-autodetect](https://docs.sonarsource.com/sonarqube-server/instance-administration/ai-features/permissions-for-ai-autodetect "mention").

## Related pages <a href="#related-pages" id="related-pages"></a>

* [ai-code-assurance](https://docs.sonarsource.com/sonarqube-server/ai-capabilities/ai-code-assurance "mention")
* [overview](https://docs.sonarsource.com/sonarqube-server/ai-capabilities/overview "mention") of AI capabilities
* Learning about [ai-codefix](https://docs.sonarsource.com/sonarqube-server/ai-capabilities/ai-codefix "mention") to get AI-generated fix suggestions
* An [overview](https://docs.sonarsource.com/sonarqube-server/instance-administration/ai-features/overview "mention") to setup AI features for instance administration
