Original announcement: GitHub · 2026-11-13. Read the official announcement.
Summary of the Update
On November 13, 2026, GitHub announced a new public preview feature enabling users to control the AI Scan functionality for repositories through REST API endpoints. This addition complements the existing AI Scan management for pull requests, granting more granular and scalable control at both organizational and repository levels.
What Has Changed?
- Introduction of a
repository_scansetting on AI Scan enablement API endpoints. - APIs affected include both organization-level (
GET and PATCH /orgs/{org}/code-scanning/ai-scan) and repository-level (GET and PATCH /repos/{owner}/{repo}/code-scanning/ai-scan) endpoints. - The setting allows enabling or disabling AI Scan for repositories similar to the existing
pr_scanfunctionality for pull requests. - Enabling or disabling at the organization level cascades to repositories, which can opt out individually if allowed.
- Enterprise policies can restrict enabling AI Scan, resulting in a 422 error if violated.
- Changing both
pr_scanandrepository_scanin a single request is supported; if either fails, the request is rejected. - Activating AI Scan does not trigger scans automatically; users with write access initiate scans manually, which consume AI credits.
Who Should Take Notice?
This feature is relevant to:
- Organization owners and security managers who manage AI Scan settings at scale across multiple repositories.
- Repository administrators seeking control to opt out specific repositories from AI Scan.
- Teams managing public repositories within organizations or private/internal repos with GitHub Code Security or GitHub Advanced Security.
- Enterprise owners who need to govern AI Scan enablement through enterprise policies.
Note that GitHub Enterprise Server is not currently supported for this feature.
Recommended Next Steps for Developers
Developers and administrators should verify and take the following actions:
- Review current AI Scan settings at the organizational and repository level using the new REST API endpoints.
- Incorporate AI Scan enablement or disablement into infrastructure-as-code scripts or automation tools to efficiently manage multiple repositories.
- Confirm enterprise policies allow AI Scan before attempting to enable it to avoid errors.
- Educate repository users about manual scan initiation and the consumption of Code Security AI credits.
- Monitor the impact on scan frequency and credit usage after enabling repository-level AI Scan.
Additional Information
Users interested in this feature can consult the official GitHub documentation on REST API endpoints for code scanning and AI Scan. There is also an ongoing discussion in the GitHub Community to share experiences and best practices.
This enhancement reflects GitHub’s effort to enhance security automation and scalability for organizations adopting AI-powered code scanning.


