官方更新 GitHub Changelog Thu, 10 Sep 2026 正文 ok 168 words

用于拉取请求的 AI Scan API 进入公开预览

英文标题:AI Scan for pull request APIs in public preview

GitHub 现已在公开预览阶段提供 REST API,可在组织和仓库层级管理代码扫描 AI Scan 对拉取请求的启用状态。团队可通过 API 在选定仓库中以编程方式部署 AI 驱动的安全检测,无需逐一在 GitHub UI 中配置。组织级设置决定整个组织是否允许运行拉取请求扫描;仓库级设置可单独启用或关闭扫描,但不能覆盖组织级的禁用状态。该功能仅面向 github.com 上的 GitHub Advanced Security 客户,暂不支持 GitHub Enterprise Server。
打开原文相关 2 · 机会 5
media16.2 KB media280.9 KB

中文

现在,你可以通过组织和仓库级别的 REST API 管理 GitHub 代码扫描中面向拉取请求的 AI Scan 启用状态。此次公开预览为团队提供了一种编程方式,可在选定仓库中部署由 AI 驱动的拉取请求安全检测,而无需在 GitHub UI 中手动逐项配置。

使用新的组织和仓库 API,读取和更新是否已启用面向拉取请求的 AI Scan。组织设置控制拉取请求扫描是否可在整个组织中运行,仓库设置则允许你为单个仓库开启或关闭扫描。仓库设置不能覆盖组织级别的禁用状态。

如需查看和更新所选仓库的 AI Scan 状态,用户可以使用 /orgs/{org}/code-scanning/ai-scan 和 /repos/{owner}/{repo}/code-scanning/ai-scan 端点。

此次公开预览适用于 github.com 上的 GitHub Advanced Security 客户。此版本不支持 GitHub Enterprise Server。更多信息请参阅 AI Scan 安全检测。

欢迎在 GitHub Community 中的公告讨论中参与讨论并留下反馈。

English / 原文

You can now manage GitHub code scanning’s AI Scan for pull request enablement with REST API endpoints at the organization and repository levels. This public preview gives teams a programmatic way to roll out AI-powered security detections for pull requests across select repositories without manually configuring each setting in the GitHub UI.

Use the new organization and repository APIs to read and update whether AI Scan for pull requests is enabled. Organization settings control whether pull request scans can run across the organization, and repository settings let you turn scans on or off for individual repositories. Repository settings do not override an organization-level disabled state.

To view and update the status of AI Scan for selected repositories, users can use the /orgs/{org}/code-scanning/ai-scan and /repos/{owner}/{repo}/code-scanning/ai-scan endpoints.

This public preview is available on github.com for GitHub Advanced Security customers. GitHub Enterprise Server is not supported for this release. For more information, see AI Scan security detections.

Join the discussion and leave feedback on the announcement in GitHub Community.