GitHub · GitHub Code Security — AI Scan for repositories (REST API)
GitHub adds REST API controls for AI Scan on repositories
As of November 13, 2026, GitHub has introduced public-preview REST API controls for enabling or disabling AI Scan for repositories at organization and repository level. Administrators can automate the configuration of AI-assisted code security scans rather than toggling each repository manually. The API does not trigger scans: authorized users must run them on demand.
What changes
A new repository_scan setting can be enabled or disabled through GET/PATCH REST endpoints /orgs/{org}/code-scanning/ai-scan and /repos/{owner}/{repo}/code-scanning/ai-scan. Private or internal repositories require GitHub Code Security or Advanced Security; GitHub Enterprise Server is unsupported. Scans consume Code Security AI credits, included or metered depending on account entitlement, and enterprise-level policy approval may be required.