Dependabot、更新前に待機時間を導入
GitHub は、npm などのパッケージレジストリにおける悪意ある新バージョンの自動展開を防ぐため、Dependabot のバージョン更新機能にデフォルトで 3 日間の冷却期間(cooldown)を導入した。
キーポイント
サプライチェーン攻撃への対策
2025 年 9 月に発生した npm パッケージの乗っ取り事件のように、悪意のあるコードが公開から数時間で拡散するリスクに対応するため、自動更新ツールによる即時展開の見直しが必要となった。
3 日間のデフォルト冷却期間
セキュリティアップデート(既知の脆弱性対応)は従来通り即座に適用されるが、通常のバージョンアップグレードについては、公開から少なくとも 3 日間待ってからプルリクエストを生成する設定がデフォルトとなった。
ユーザーによる柔軟な設定
プロジェクトの要件に応じて、`dependabot.yml` を使用して冷却期間のカスタマイズが可能であり、完全な無効化や異なる期間の設定も引き続きサポートされる。
マルウェア対策の時間的窓を回避
npm マルウェアは毎日約 18 パッケージずつ新規登録されており、3 日の待機期間により、攻撃が検知されるまでの短命な公開期間を避けることができます。
多層防御の一部として位置づけ
この機能は迅速なマルウェア拡散には有効ですが、潜伏するバックドアやビルドシステムの侵害などには無力であるため、ロックファイルの活用や CI でのスクリプト無効化などの他の対策と併用する必要があります。
デフォルト設定は 3 日間でバランスが取れている
過去の主要なサプライチェーン攻撃事例の分析に基づき、攻撃が最も活発な期間を過ぎつつも依存関係の更新を不必要に遅らせないよう、3 日が標準として選ばれています。
重要な引用
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.
The previous example was live for only two hours. Other widely used packages have followed the same arc... caught within a few hours of publication.
A cooldown keeps you out of that opening window and lets a release accumulate some scrutiny before it reaches you.
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.
影響分析・編集コメントを表示
影響分析
この変更は、自動化されたソフトウェアビルドパイプラインにおけるサプライチェーン攻撃に対する防御姿勢を根本的に変えるものであり、セキュリティと利便性のバランスを再定義する重要な転換点です。開発者が悪意あるコードに無意識のうちに感染するリスクを大幅に低減し、業界全体でのレジリエンス向上に寄与します。
編集コメント
自動化のスピードがセキュリティリスクを招くという皮肉な現実に対し、あえて「待つ」という人間中心の判断プロセスをツールに組み込んだ点は非常に示唆に富んでいます。今後は、この冷却期間中にどのようなインテリジェントなスキャンや分析が行われるかが、次なる進化のポイントとなるでしょう。
2025 年 9 月、ある npm のメンテナの認証情報がフィッシング攻撃によって盗まれ、chalk や debug など、週に合計 20 億回以上ダウンロードされる約 dozen のパッケージに仕掛けられた偽バージョンが公開されました。このコードは、それを読み込んだブラウザアプリ内の暗号化ウォレットのアドレスを書き換えるものでした。悪意のあるバージョンは約 2 時間公開されていましたが、コミュニティによって発見され、npm 側で削除されるまででした。
2 時間の対応は迅速です。しかし、自動化された更新ツールにとっては、新しいバージョンを認識し、プルリクエストを開いてチームに提示するまでに十分な時間でもあります。なぜなら、バージョン更新ツールはリリースが公開された瞬間に最新版を取得するように設計されているからです。
このパターンは、サプライチェーン攻撃の増加した割合の背後にある要因です。悪意のあるコードは新リリースに乗って公開レジストリに載り、人間やスキャナーが確認する前に数分以内にビルドパイプラインに取り込まれてしまいます。
コールドダウン(待機期間)はこの計算を変えます。新しいリリースを採用する前に数日待つことで、メンテナ、セキュリティ研究者、自動化されたスキャナーが悪意のあるバージョンを特定し、プルリクエストに到達する前に削除する時間を確保できます。
セキュリティ上の問題ではないバージョンアップの場合、Dependabot は現在、リリースが公開されてから少なくとも 3 日後にプルリクエストを開くようになります。ただし、dependabot.yml のコールドダウン設定オプションは依然として動作を制御するため、プロジェクトに合わせて異なる待機期間パラメータを選択することも可能です。
Dependabot の更新には 2 つのタイプがある
Dependabot は GitHub に標準搭載されたツールで、依存関係のセキュリティ維持と最新状態の保ちを担っています。このツールは大きく分けて 2 つの役割を果たします。
1 つ目は「セキュリティ更新」です。これは既知の脆弱性に対応するもので、利用しているパッケージに関する注意報が発表されると、Dependabot が即座にアラートを発行し、パッチ適用版へ移行するためのプルリクエストを起票します。
2 つ目は「バージョン更新」です。これは現在の依存関係の状態に関わらず、新しいリリースが出た時点で常に最新状態を保つためのものです。
今回導入された 3 日間の待機期間(クールダウン)のデフォルト設定は、「バージョン更新」のみを対象としています。「セキュリティ更新」については依然として即座に起票されます。なぜなら、すでに公知となっている欠陥に対する修正を遅らせることは許されないからです。本記事で取り上げているのは「バージョン更新」です。ここでは目標が最新状態の維持であり、リスクとなるのが未検証のリリースを採用してしまうことです。
事例と GitHub Advisory Database のデータ
攻撃者が人気のあるパッケージを乗っ取った場合、悪意あるバージョンは短命である傾向があります。公開され、インストールを通じて拡散し、通常は数時間以内に検出されます。前述の例では、その悪意あるバージョンはわずか 2 時間の稼働でした。他の広く使われているパッケージでも同様の経過をたどっており、Solana の web3.js、Axios、ua-parser-js などに対する改ざんされたビルドも、公開から数時間以内に検出されています。
より一般的に、GitHub は GitHub Advisory Database を通じてこのパターンを直接把握しています。これはさまざまなエコシステムにおけるオープンソースのセキュリティアドバイザリをカタログ化したデータベースです。2026 年 5 月までの 1 年間には、npm のマルウェアに関する advisories が前年の約 6,200 件から増加し、6,500 件以上が登録されました。これは、毎日およそ 18 件の新しい悪意のある npm パッケージがカタログに追加されていることを意味します。
コールドダウン(待機期間)を設定することで、こうした攻撃の隙間を避け、リリースがあなたの手元に届く前に十分な検証が行われる時間を確保できます。
なぜ 3 日間なのか
人気のあるパッケージを狙った公開されたマルウェアは、通常すぐに検出されます。2018 年から 2026 年にかけて報告された 21 の広範なサプライチェーンインシデントをレビューした結果、同じパターンが確認されました。axios、Solana web3.js、ua-parser-js、Ledger Connect Kit などの悪意のあるバージョンは、公開から数時間以内に削除されています。もしコールドダウンの仕組みがあれば、これらの一時的な公開の大半は、誰かがインストールする前にフィルタリングできたはずです。
デフォルトの 3 日間という設定は、2 つの目標をバランスよく達成するためのものです。つまり、攻撃が最も頻繁に起こる期間を過ぎさせる一方で、依存関係の更新を必要以上に遅らせることはありません。
他のコミュニティメンバーも同様に 3 日間のコールドダウンを採用しており(一部はさらに長い期間を設定している)、これにより開発者がツール間を移動しても Dependabot の挙動が一定に保たれます。
なお、Dependabot の設定オプションで、より長くまたは短い待機時間を指定することも可能です。
多層防御の考え方
コールドダウン(待機期間)は、悪意あるバージョンが公開され、瞬く間に拡散して検知されるという特定の攻撃パターンを想定した機能です。しかし、リリースに仕掛けられたバックドアが休眠状態のまま放置されるような長期戦や、メンテナによる破壊行為、ビルドシステムの乗っ取りなどに対しては、単独では大きな効果を発揮しません。
このデフォルト設定の目的は、時間的制約のある一般的な脆弱性を排除することであり、他の防御策を代替するものではありません。コールドダウンは高速な攻撃への対策に過ぎないため、複数の防御層の一つとして位置づけるべきです。
具体的な追加対策としては、ロックファイルによる依存関係の固定、CI 環境でのインストールスクリプト無効化(可能な場合)、ビルドパイプラインにおけるトークンの範囲限定、マージ前の更新内容レビューなどが挙げられます。
信頼性の高い内部パッケージとパブリックレジストリで待機時間を切り替えたい場合は、Dependabot の設定に関するドキュメントをご覧ください。また、コールドダウンパラメータの全リストについては、Dependabot 設定オプションのリファレンスを参照してください。
ここから先へ
これは、GitHub で開発するすべての人のソフトウェアサプライチェーンを強化するために私たちが取り組んでいる複数の施策の一つです。デフォルトで有効になっているため、アクティブ化のために特別な変更は不要です。また、ワークフローに合わせて調整することも可能です。
Dependabot コミュニティのディスカッションで、実際の運用結果についてご意見を聞かせてください。
本記事「The case for a cooldown: Why Dependabot now waits before issuing version updates」は、GitHub Blog の投稿です。
原文を表示
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 this default behavior keeps Dependabot consistent as developers move between tools.
You can always set a longer or shorter window with Dependabot’s cooldown configuration option.
Defense in depth
A cooldown is built for a specific pattern: a malicious version that ships, spreads, and gets caught quickly. It does little against attacks that play a longer game, including backdoors planted in releases and left dormant, maintainer sabotage, or a compromised build system. The point of the default is to remove a common and time-sensitive path, not to stand in for the rest of your defenses.
Because a cooldown only addresses the fast-moving case, it should be one layer among several. Some additional steps to take include pinning dependencies with lockfiles, disabling install scripts in CI where you can, scoping the tokens in your build pipelines, and reviewing updates before they merge.
If you’d like to customize your delay for highly trusted internal packages versus public registries, check out the documentation on configuring Dependabot. Or see the Dependabot configuration options reference for the full set of cooldown parameters.
Where we go from here
This is one step among several we are taking to harden the software supply chain for everyone who builds on GitHub. It’s on by default, so you don’t have to change anything to activate it. You can also tune it to fit your workflow.
Tell us how it performs in the Dependabot community discussions.
The post The case for a cooldown: Why Dependabot now waits before issuing version updates appeared first on The GitHub Blog.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み