
GitHub详细介绍了其在过去几个月中为npm和GitHub Actions推出的防御措施:签名发布、加固令牌和增强隔离。这是对2025-2026年攻击浪潮的直接回应。
用简单的语言来说 - GitHub 在经历了数月高调的供应链攻击后,正在向 npm 和 GitHub Actions 发送一批增强安全性的更改。签名发布、收紧令牌、更严格的工作流隔离。对于懒惰的管道来说可能会很痛苦,但值得。
npm + GitHub Actions 的组合集中了 JavaScript CI/CD 的绝大部分份额 - 因此也集中了越来越多的针对性攻击,特别是通过维护者令牌的妥协。GitHub,这两个平台的所有者,于2026年7月28日发布了一篇关于过去几个月内“已发布的更改”的回顾文章。这一举措是在更广泛的访问加固范围内进行的(也可以看到,2026年9月2日开始对所有提交的开发者实施2FA义务 - 公告#1400)。
根据官方文章(github.blog/security),防御措施涵盖三个方面:
Une attestation lie un artefact publié (paquet npm) à son processus de build - workflow, commit, environnement - de manière vérifiable côté consommateur. C'est la brique fondamentale du cadre SLSA (Supply-chain Levels for Software Artifacts) porté par la Linux Foundation.
具体来说,维护者现在可以从签名的 Actions 工作流中发布,并附带可验证的证明。这打破了“包已签名但推送到仓库外部”的攻击类别:包与原始提交之间的可追溯性变得可审计。
有三个信号需要记住。首先,攻击面从仓库滑向了管道:妥协一个维护者令牌或CI运行器现在比直接访问源代码提供了更多的东西。其次,GitHub 正在平稳地行动 - 新规则与旧模式共存,逐步迁移,没有突然的中断。最后,占主导地位的平台实际上在强加其教义:GitLab、Bitbucket 和 Sonatype 生态系统必须跟上或失去企业信誉。
对于后端负责人:从Actions配置受信发布,在发布工作流中启用证明。对于平台工程师:检查您的自托管运行器,通常比托管的GitHub运行器加固较少。对于CISO:在客户要求之前,将证明验证添加到您的发布管道中。
在未来几个月内,关注npm顶级包的证明计数器,记录硬化后的首次已记录攻击尝试,以及PyPI和Cargo是否与同一模式保持一致(或不一致)。
本文由人工智能撰写,并经人工编辑审核。
How will these new security measures affect the open-source community's collaborative spirit? Will it stifle innovation or foster safer development practices?
I wonder if these measures will be enough to stop the supply-chain attacks. The attackers are getting more sophisticated every day.
It's a constant arms race, but improved security measures can help tip the balance in our favor.
I'm glad to see GitHub taking proactive steps to secure npm and Actions. It's about time they addressed these vulnerabilities head-on.
I wonder how these new measures will affect the speed of development. Will they slow down the workflow for legitimate developers?
I'm curious about the impact on smaller projects. Will these new measures add unnecessary complexity for developers?
I'm curious about the impact on small developers. Will these measures make it harder for them to contribute to open-source projects?
I hope these new security measures will indeed make a difference. It's crucial for open-source platforms to stay ahead of these evolving threats.
Accès contrôlé aux modèles de pointe : habilitation, clés matérielles, juridictions