GitHub adds REST API controls for repository AI Scan
Brief
GitHub’s public preview lets teams manage AI Scan for repositories through REST API calls, including scripted rollouts across repositories.
API controls
- Set repository_scan to enabled or disabled using the organization or repository AI Scan endpoints.
- You can update repository_scan and pr_scan in one request; if either change is blocked, neither setting changes and the request returns a 422 error.
Access and limits
- Organization owners and security managers manage organization settings; repository administrators can opt individual repositories out.
- Available for public repositories owned by organizations and for private or internal repositories with GitHub Code Security or GitHub Advanced Security. Enterprise owners must allow AI Scan; GitHub Enterprise Server is not supported.
- Enabling the setting does not start a scan. Users with write access run scans on demand, and each scan consumes GitHub Code Security AI credits.
Generated by AI from the original article. Check the source for full details.