insight Simon Willison 2026-07-23T04:50 正文 ok 71 words

Seth Larson:PyPI 限制向超过 14 天的发布版本上传新文件

英文标题:Quoting Seth Larson

Python Package Index(PyPI)现已拒绝向创建超过 14 天的发布版本上传新文件。该限制旨在降低 PyPI 项目的发布令牌或自动化工作流遭入侵后,攻击者向长期稳定旧版本植入恶意文件的风险。PyPI 表示,目前尚未发现这一方式被实际滥用,但此前并不存在技术性障碍,攻击者未利用可能只是因为尚未意识到该能力。对开发者而言,应确保发布流程、令牌和自动化工作流安全,并在需要补充发布文件时及时完成。
打开原文相关 2.4 · 机会 1

中文

Python Package Index(PyPI)现已拒绝向创建超过 14 天的发布版本上传新文件。这项限制已实施,旨在防止 PyPI 项目的发布令牌或工作流遭到入侵时,长期稳定的旧版本被植入恶意内容。据我们所知,这种方式尚未被滥用;但除了攻击者尚未意识到可以这样做之外,此前并没有其他技术性原因能够阻止攻击发生。

English / 原文

The Python Package Index (PyPI) now rejects new files being uploaded to releases that are older than 14 days. This restriction was put in place to prevent old and long-stable releases from being poisoned in case publishing tokens or workflows of PyPI projects were compromised. As far as we are aware this has not yet been abused, but there is no technical reason beyond that attackers weren't aware it was possible.