On November 13, 2026, GitHub announced public-preview REST API controls for enabling or disabling AI Scan for repositories. The new repository_scan setting can be managed at organization and repository scope. That sounds like a straightforward automation improvement. For security leaders, however, the important question is not whether a setting can be deployed through infrastructure as code. It is whether policy inheritance, scan execution, spend and remediation are governed as separate decisions.

GitHub’s November 13 release note explicitly distinguishes enabling the feature from starting a scan. That distinction should shape any enterprise rollout.

Configuration is not evidence of coverage

An enabled repository is not necessarily a scanned repository. GitHub says users with write access still initiate scans on demand and that scans consume GitHub Code Security AI credits. A dashboard that counts enabled repositories as assessed assets will overstate assurance. Keep three separate records: eligible repositories, enabled repositories, and repositories with a recent completed scan. Then add a fourth: findings triaged and resolved.

This distinction parallels the evidence problem in GitHub AI application scanning, where a security alert is a useful signal but cannot establish that runtime permissions or production behavior are safe.

Six tests before turning on the organization setting

1. Verify the enterprise policy ceiling

GitHub documents that requests to enable AI Scan return HTTP 422 when enterprise policy does not permit the feature. Treat that as a policy refusal, not a retryable deployment error. In deployment pipelines, surface the reason and stop; do not silently weaken enterprise policy. Record who owns the exception decision.

2. Test inheritance and repository opt-outs

When an organization enables repository scanning, repositories inherit the setting and may opt out individually. When the organization disables it, repositories cannot turn it on. Test this matrix with representative repositories: inherited enablement, deliberate opt-out, organization disablement and subsequent policy restoration. Compare the effective state after each change, not just the submitted PATCH request.

3. Test combined changes as one transaction

The API can update pr_scan and repository_scan in the same request. GitHub says a blocked change causes the request to return 422 and neither setting changes. A release pipeline should read the resulting configuration and distinguish an all-or-nothing rejection from a partial success. This is a good place for explicit deployment assertions rather than a green job based on a transport-level response alone.

4. Budget the scan, not the switch

Since enablement does not launch a scan, credit forecasts should be based on intended scan cadence, eligible repositories, reruns and exception handling. Build a separate approval for expensive backlog campaigns. Track cost per completed scan and cost per actionable finding; neither figure is a vendor-promised efficiency metric. Those measures are proposed internal controls and require your own baseline.

5. Separate permission to configure from permission to run

GitHub identifies organization owners and security managers as managers of organization settings, repository administrators as able to opt repositories out, and users with write access as able to launch scans. Map those capabilities to your actual roles. A repository writer’s ability to trigger consumption may be appropriate, but it should not automatically imply permission to alter organization-wide policy or approve an exception.

6. Demand remediation evidence

Do not close a risk record merely because a scan ran. Capture the commit or repository revision, scan timestamp, finding classification, assigned owner, fix commit, validation method and disposition. A finding dismissed as accepted risk needs a documented approver and review date. These records let audit teams distinguish detection from risk reduction.

A compact rollout evidence model

Policy allowedSetting effectiveScan completedFinding resolved

Each stage requires its own evidence. A successful API deployment proves the second stage at most; it does not prove the third or fourth. This is the same principle behind distinguishing generated patches from verified remediation.

Who can use the preview—and what it does not promise

According to GitHub, repository AI Scan is available for public repositories owned by organizations and for private or internal repositories with GitHub Code Security or GitHub Advanced Security. Enterprise owners must permit AI Scan through enterprise policy. GitHub Enterprise Server is not supported. These are the vendor’s November 13 conditions; procurement teams should confirm their current entitlement and any subsequent changes before deployment.

For broader governance, integrate the rollout into an authorization decision model: the identity making a call, the effective enterprise policy, the repository resource, the requested action and the recorded outcome. It is tempting to treat API availability as operational maturity. The stronger approach is to prove that the policy state, scanning activity, credit use and remediation trail can be reconciled independently.

Source and review note

Primary source: GitHub Changelog, “Manage AI Scan for repositories using the REST API,” November 13, 2026. The six tests and four-stage model above are CorpExcellence editorial analysis, not claims that GitHub certifies those controls.