New API setting
GitHub has added a repository_scan setting to its existing AI Scan REST API endpoints. Authorized organization and repository administrators can set it to enabled or disabled.
This makes it easier to roll out the feature across repositories through scripts or infrastructure as code. A repository cannot enable it if the organization setting is disabled.
Scope and limits
Enabling the setting does not itself start a scan. Users with write access must run scans on demand, and each scan consumes GitHub Code Security AI credits.
The preview covers public organization repositories and eligible private or internal repositories with the required security subscription. GitHub Enterprise Server is not supported.


