Daily Tech Briefing
AI 科技速览

每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。

AI 快讯
GitHub Blog AI · 2026/7/23 16:00:00

The case for a cooldown: Why Dependabot now waits before issuing version updates

AI 中文解读
GitHub的自动更新工具Dependabot现在会“冷静”三天再推送新版本,防止恶意代码趁虚而入。 过去,依赖更新工具会在新版本发布瞬间自动拉取,这给了黑客可乘之机——他们先盗取维护者账号,发布带毒版本,再在几个小时内被社区发现,但自动更新早已把恶意代码送进无数项目。现在,Dependabot对非安全的版本更新默认等待三天,让安全团队和扫描工具先揪出恶意版本再动手。安全更新(比如修复已知漏洞)则不受影响,依然秒级响应。 对普通开发者来说,好处是项目更安全了,坏处是日常版本更新会慢几天,但为了防范供应链攻击,这点等待很值得。毕竟,没人想因为自动更新而把数字货币钱包地址“改”成黑客的。
In September 2025, an attacker phished the credentials of a single npm maintainer and published booby-trapped versions of chalk, debug, and around a dozen other packages that are together downloaded more than 2 billion times a week. The code rewrote cryptocurrency wallet addresses inside any browser app that loaded it. The poisoned versions were live for roughly two hours before the community caught them and npm pulled them. Two hours is a fast response. However, it is also more than enough time for an automated update tool to see the new version, open a pull request, and put it in front of your team, because version update tooling is built to grab the newest release the moment it lands. That pattern sits behind a growing share of supply chain attacks. The malicious code rides in on a brand-new release, is published to a public registry, and gets pulled into build pipelines within minutes, before a human or a scanner has even looked at it. A cooldown changes that math. Waiting a few days before adopting a new release gives maintainers, security researchers, and automated scanners time to spot a malicious version and get it pulled before it ever reaches your pull requests. For non-security version bumps, Dependabot now waits at least three days after a release is published before opening a pull request. The cooldown configuration option in the dependabot.yml still controls the behavior, though, so you can choose a different cooldown parameter that fits your project. Two kinds of Dependabot updates Dependabot is GitHub’s built-in tool for keeping dependencies secure and up-to-date, and it does two distinct jobs: Security updates respond to a known vulnerability: when an advisory is published for a package you use, Dependabot issues an alert and opens a pull request to move you to the patched version. Version updates keep your dependencies current as new releases come out, regardless of your current version’s health. The new three-day cooldown default applies only to version updates. Security updates still open right away, since a delay there would hold back a fix for a flaw that is already public. Everything in this article is about version updates, where the goal is staying current, and the risk is adopting a release before it has been vetted. Case studies and GitHub Advisory Database data When attackers compromise a popular package, the poisoned version tends to have a short lifespan. It gets published, spreads through whatever installs it, and gets caught, usually within hours. The previous example was live for only two hours. Other widely used packages have followed the same arc, with compromised builds of Solana web3.js, Axios, and ua-parser-js each caught within a few hours of publication. More generally, GitHub sees this pattern directly through the GitHub Advisory Database, which catalogs open source security advisories across ecosystems. In the year ending May 2026, the database published more than 6,500 npm malware advisories, up from roughly 6,200 the year before, which adds up to approximately 18 newly cataloged malicious npm packages every day. A cooldown keeps you out of that opening window and lets a release accumulate some scrutiny before it reaches you. Why three days Published malware targeting popular packages tends to get caught fast. A review of 21 widely reported supply chain incidents between 2018 and 2026 found the same pattern: malicious versions of axios, Solana web3.js, ua-parser-js, and Ledger Connect Kit were each pulled within hours of publication, and a cooldown could have filtered out the majority of these short-lived publishes before anyone installed them. Three days as the default balances two goals: it pushes you past the window where most of these attacks live, and it doesn’t hold your dependencies back longer than necessary. Other community members have also landed on a three-day cooldown (though some go even longer), so
分享
阅读原文