AIFeed

pull_request_target 强制执法将于 12 月 2 日开始

AI summary

自 2026 年 12 月 2 日(周三)起,GitHub Actions 将在受影响的公共仓库中默认阻止 pull_request_target 工作流,除非适用的 GitHub Actions 事件策略明确允许。这是对 11 月 2 日所宣布变更的提醒,执行日期未变。由 pull_request_target 触发的工作流在基础仓库上下文中运行并可访问其机密,在该上下文中运行来自 fork 的不可信代码可能泄露机密或危及构建流水线。私有和内部仓库不受影响,已配置的适用事件策略仍然有效。

Translation(model translation, not the source's own text)
featured-v3-deprecations
featured-v3-deprecations

从 2026 年 12 月 2 日(星期三)起,GitHub Actions 将在受影响的公共仓库中默认阻止 pull_request_target 工作流,除非适用的 GitHub Actions 事件策略明确允许它们。

这是对我们在 11 月 2 日宣布的变更的提醒。执行日期没有改变。

由 pull_request_target 触发的工作流在基础仓库的上下文中运行,并且可以访问其机密。在该上下文中运行来自 fork 的不可信代码可能会泄露机密或危及你的构建流水线。

私有仓库和内部仓库不受影响,你已配置的适用事件策略仍然适用。

如果你维护响应来自 fork 的拉取请求的工作流,请检查 Policy insights 中是否有被阻止的工作流运行。在适当的情况下,将受影响的工作流更新为使用更安全的事件,例如 pull_request。如果某个工作流需要 pull_request_target,请创建或更新适用的 GitHub Actions 事件策略以明确允许它。你可以将策略限定到特定的工作流文件。只有在确认你的工作流不会在拥有机密或特权令牌访问权限的情况下执行不可信的拉取请求代码后,才允许该事件。

此变更将适用于 GitHub Free、GitHub Team 和 GitHub Enterprise Cloud 上受影响的公共仓库。

有关详细信息,请参阅 pull_request_target 的默认策略以及如何配置事件策略和查看策略洞察。

Related Posts

  • NOV.19ImprovementRed Hat Enterprise Linux runner 镜像现已正式可用Actions
  • NOV.12RetiredActions for ARM32 Linux 与 Windows 退役Actions
  • NOV.2Retiredpull_request_target 自 12 月 2 日起默认被阻止ActionsApplication Security
  • Application Security
  • OCT.28ReleaseGitHub Agentic Workflows 正式可用ActionsCopilotUniverse ‘26
  • Universe ‘26
  • OCT.28ImprovementGitHub Actions 新增多云计算以提高可靠性ActionsUniverse ‘26
  • Universe ‘26
  • OCT.28ReleaseGitHub Actions 工作流锁定文件正式可用ActionsUniverse ‘26
  • Universe ‘26
  • OCT.22ImprovementMeta API 端点针对 Actions blob 存储更新Actions
  • OCT.15ReleaseXcode 27 runner 镜像正式可用Actions
  • OCT.14ReleaseGitHub Actions 工作流锁定文件进入公开预览Actions

The translation is machine-generated and individual terms may be off. Nothing is rewritten or cut; the original is authoritative.

Published by GitHub Changelog
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗