A new set of REST API endpoints now allows teams to control GitHub code scanning's AI Scan functionality for pull requests at both the organization and repository levels. The public preview release provides a programmatic alternative to manual configuration, letting security teams deploy AI-driven vulnerability detection across multiple repositories without needing to adjust settings individually through the GitHub interface.

Manage AI Scan for pull requests at scale

The fresh organization and repository APIs enable administrators to check and modify the activation status of AI Scan for pull requests. Organization-level settings determine whether pull request scanning is permitted throughout the organization, while repository-level settings provide granular control to enable or disable scans on a per-repository basis. Settings at the repository level cannot override an organization-level restriction that disables the feature.

To retrieve and modify AI Scan status across chosen repositories, teams can leverage the /orgs/{org}/code-scanning/ai-scan and /repos/{owner}/{repo}/code-scanning/ai-scan endpoints.

The public preview is currently accessible on github.com exclusively for customers with GitHub Advanced Security subscriptions. GitHub Enterprise Server deployments are not included in this initial release. Additional details are available in the AI Scan security detections documentation.

Interested users can participate in discussions and submit feedback through the GitHub Community forum.

Source: GitHub Blog