AI觉醒星球
Awakening is here
Knowledge File / 全球热点解读
2026-08-01 4 浏览 公开

npm 限制绕过2FA的粒度访问令牌

npm 宣布绕过2FA的粒度访问令牌将无法执行敏感操作,需交互式2FA,计划于2027年1月实施。

SOURCE / 全球热点解读 MIN / 9 ACCESS / 公开 POST / 2026-08-01 00:45:50

原贴

查看原文
作者:Allison 来源站点:github.blog 原贴时间:

原文

npm granular access tokens (GATs) configured to bypass 2FA can no longer perform sensitive account, org, and package management actions. These now require an interactive 2FA challenge, closing one of the largest credential-based attack surfaces on the registry. This only impacts npm granular access tokens. This does not affect GitHub personal access tokens, GitHub App tokens, or GITHUB_TOKEN in Actions. This only impacts npm granular access tokens. This does not affect GitHub personal access tokens, GitHub App tokens, or GITHUB_TOKEN in Actions. Changing package access, maintainers, or trusted publishing configuration Managing organization/team membership and package grants An attacker could previously use a leaked 2FA-bypass token to take over an account and mint new tokens, add a maintainer, and more. A token that skips 2FA shouldn’t also be a way to manage your account. Stop using 2FA-bypass tokens for these operations and perform them interactively (web or CLI) with a 2FA challenge. 2FA-bypass tokens will also lose direct publish. Their publishing surface will reduce to reading private packages and staging a publish, which a maintainer approves with 2FA. We are targeting January 2027 for this update. You should move automated publishing to trusted publishing (OIDC) or staged publishing . This continues the deprecation we announced on July 8 . Have questions or a workflow that would be blocked? Tell us in the community discussion .

中文翻译

配置为绕过2FA的npm粒度访问令牌(GATs)不能再执行敏感的账户、组织和包管理操作。

这些操作现在需要交互式2FA挑战,从而关闭了注册表上最大的基于凭据的攻击面之一。

这仅影响npm粒度访问令牌。

这不影响GitHub个人访问令牌、GitHub App令牌或Actions中的GITHUB_TOKEN。

这仅影响npm粒度访问令牌。

这不影响GitHub个人访问令牌、GitHub App令牌或Actions中的GITHUB_TOKEN。

更改包访问权限、维护者或受信任发布配置

管理组织/团队成员资格和包授权

攻击者以前可以使用泄露的绕过2FA的令牌接管账户并铸造新令牌、添加维护者等等。

跳过2FA的令牌也不应该是管理您账户的一种方式。

停止使用绕过2FA的令牌执行这些操作,并通过交互式(Web或CLI)2FA挑战来执行。

绕过2FA的令牌也将失去直接发布的权限。

它们的发布范围将缩减为读取私有包和暂存发布,由维护者通过2FA批准。

我们计划在2027年1月实施此更新。

您应该将自动化发布迁移到受信任发布(OIDC)或暂存发布。

这延续了我们于7月8日宣布的弃用计划。

有问题或工作流程会被阻止?请在社区讨论中告诉我们。

核心信息

npm 宣布绕过2FA的粒度访问令牌将无法执行敏感操作,需交互式2FA,计划于2027年1月实施。

  • npm 宣布绕过2FA的粒度访问令牌将无法执行敏感操作,需交互式2FA,计划于2027年1月实施。
  • 原贴提到:npm granular access tokens (GATs) configured to bypass 2FA can no longer
  • 来源:github.blog

详细解读

信号:npm 正在升级访问令牌的安全策略,明确禁止绕过2FA的粒度访问令牌(GATs)执行敏感操作,要求交互式2FA验证。

为什么重要:这是供应链安全的关键补丁。此前,一旦令牌泄露,攻击者可以绕过2FA直接接管账户或添加恶意维护者,影响面极大。限制后,即使令牌泄露,也无法单独完成敏感操作,双重验证成为必要防线。

对谁有价值:所有 npm 包维护者、使用自动化发布流程的开发团队、以及依赖 npm 生态的组织,都需要立即关注并评估现有令牌配置。

行动建议:停止使用绕过2FA的令牌进行包管理或发布;将自动化发布迁移到受信任发布(OIDC)或暂存发布;在2027年1月前完成调整,避免中断。

风险与限制:此变更仅针对 npm 粒度访问令牌,不影响 GitHub 个人访问令牌、App 令牌或 Actions 中的 GITHUB_TOKEN,但可能存在未覆盖的边角情况,且迁移过程可能需要调整现有 CI/CD 流程。

信息差价值

这条内容的真正价值,不只是“有人发布了一个新功能”,而是它揭示了 github.blog 背后的产品方向、工作流变化或竞争信号。对 OPC 来说,这种信息可以转化成持续追踪的栏目选题。

如果把《npm 限制绕过2FA的粒度访问令牌》放到你的内容系统里,它最大的价值在于帮助读者更快看懂“为什么值得关注”,而不是只看到一条碎片化动态。

参考来源

上一篇 Google Deepmind发布Gemini Robotics 2,为从桌面机械臂到人形机器人的各种形态提供动力 下一篇 国家发改委:将加快《人工智能法》立法进程