BuildRiot
Sign in

AISource: GitHub

GitHub previews REST API controls for repository AI Scan settings

GitHub added repository_scan to its AI Scan settings API in public preview, letting security teams automate configuration across organizations and repositories. Enabling the setting does not start a scan.

GitHub logo
Cover: BuildRiot

GitHub added repository_scan to its AI Scan settings REST API in public preview on November 13, 2026, enabling automated configuration across organizations and repositories. The setting accepts enabled or disabled and adds repository-backlog configuration alongside existing pull-request controls. According to GitHub, organization owners and security managers manage organization settings, while repository administrators can opt repositories out. Sources: GitHub

GitHub documents GET and PATCH /orgs/{org}/code-scanning/ai-scan, requiring fine-grained Organization Administration read and write permissions, respectively. For GET and PATCH /repos/{owner}/{repo}/code-scanning/ai-scan, the respective permissions are Repository Code scanning alerts read and Repository Administration write. Sources: GitHub

GitHub’s documentation says enterprise policy defaults to disallowed; an enterprise owner must permit AI Scan before organizations can enable it. Repositories inherit organization enablement and can opt out, but cannot enable AI Scan when their organization disables it. Policy-blocked updates return 422; a combined pr_scan and repository_scan update changes neither setting if either change is blocked, though 422 can also indicate other errors. Sources: GitHub

For organization-owned repositories, GitHub says public repositories need no active-committer license, while private and internal repositories require GitHub Code Security or GitHub Advanced Security. Users with write access trigger repository scans on demand, and each scan consumes Code Security AI credits separately from active-committer licensing. GitHub Enterprise Server is unsupported. Sources: GitHub

A suggested rollout is to read and save current settings, update the intended scope with {"repository_scan":"enabled"}, then read settings again and check affected repositories. Enabling repository_scan does not execute a scan or prove one ran; the follow-up read verifies configuration, while QATechTools recommends checking scan evidence separately. GitHub’s announcement gives no general-availability date for the management preview. Sources: GitHub, QATechTools

Why it matters

Security teams can automate repository AI Scan configuration through scripts or infrastructure as code. Enterprise policy still gates enablement, and enabling the setting neither starts a scan nor verifies that one ran.

Attribution

Sources

  1. 1GitHubManage AI Scan for repositories using the REST APISource published (UTC)
  2. 2QATechToolsGitHub AI Scan REST API: QA Checks for Safe RolloutsSource published (UTC)
  3. 3GitHubREST API endpoints for code scanning
  4. 4GitHubAI Scan for a repository's backlog

Read the original source for full details and context.

Report a problem

Links, dates or what you expected. Do not include passwords or private data.

More on AI

All AI stories
GitHub previews REST API controls for repository AI Scan settings · BuildRiot