AI 编程工具放大 npm 供应链攻击风险
Bloom Security 的研究 SlugFest 发现,超过 1,500 个 npm 包易受一种与 GitHub 仓库地址有关的发布攻击影响,这些包累计下载量超过 1,000 万次。问题源于 npm Trusted Publishing 最初以可读的仓库 slug 而非不可变的仓库标识建立信任,仓库改名、转移或删除后旧地址可能被他人占用,从而在无需窃取凭据的情况下获得发布权限。研究还称,AI 智能体每月在典型终端自动安装约 70 个包,在开发者机器上接近 350 个;npm 已实施修复并确认完成修复。
该研究显示,AI 驱动的自动安装可能放大发布信任关系破裂的后果,npm 随后已修复该问题。

AI coding tools are changing how developers obtain and use software. But the growing volume of automated package installations is creating new challenges for enterprise security teams. A vulnerability uncovered by Bloom Security demonstrates how weaknesses in software publishing infrastructure can intersect with these automated workflows. It could potentially expose organizations to malicious code without requiring attackers to steal credentials.
The research, named SlugFest, identified more than 1,500 npm packages vulnerable to a publishing attack involving GitHub repository addresses. Together, the packages had accumulated more than 10 million downloads.