What changed
GitHub added a repository_scan setting to its AI Scan enablement endpoints. Organization owners and security managers can now enable or disable repository-wide AI Scan with GET and PATCH requests, while repository administrators can opt individual repositories out. The same API can update pull-request scanning and repository scanning together, and GitHub rejects the whole request if policy validation fails.
The important boundary is that enabling the setting does not launch a scan. A user with write access still starts scans on demand, and each run consumes GitHub Code Security AI credits. AI Scan is in public preview, supports all programming languages, and adds findings to the existing code-scanning backlog alongside CodeQL results.
Sources: GitHub changelog announcement, GitHub REST API reference, AI Scan repository documentation.
Why it matters
AI-assisted security review becomes a platform policy instead of a setting someone has to remember in a dashboard. An engineering team can declare an organization-wide default, keep exceptions explicit at the repository level, and audit the configuration through the same automation used for other security controls. That makes it easier to put broader AI review into a repeatable onboarding or compliance workflow.
The product also avoids replacing the existing security system. AI Scan searches for vulnerabilities independently of CodeQL, suppresses matching findings when CodeQL already reports them, and writes its results back into the familiar alert backlog. Existing assignment, issue-linking, security-campaign, and agentic-autofix workflows can therefore remain the operating surface.
Builder takeaway
Treat the new API as a control-plane primitive, not as an always-on replacement for CodeQL. A practical rollout is to manage repository_scan in organization policy, keep repository opt-outs reviewable, and track Code Security AI credits as a real budget. Because scans are still on demand and bounded to a 30-minute, 150,000-credit detection window during preview, teams can add the control to CI or scheduled security operations deliberately rather than turning every push into an unbounded model call.