npm と GitHub Actions のサプライチェーン攻撃対策を強化
GitHub は npm と GitHub Actions のサプライチェーン攻撃対策として、高影響アカウントの自動ロック機能やプルリクエストターゲットデフォルトの変更などを実装し、攻撃連鎖を断ち切る方針を発表した。
AI深層分析を開く2026年7月29日 03:11
AI深層分析
キーポイント
npm における高影響アカウント保護機能の導入
2026 年 6 月より、メールアドレス変更や 2FA リカバリーコード使用時に高影響アカウントを 72 時間読み取り専用モードに切り替える機能が実装される。
GitHub Actions のプルリクエストターゲットデフォルト変更
フォークからの信頼できないコードのチェックアウトを防ぐため、actions/checkout のデフォルト動作が変更され、明示的なオプトアウトが必要となる。
サプライチェーン攻撃の連鎖を断つ包括的アプローチ
単一のセキュリティ機能ではなく、初期侵害から特権昇格、拡散に至る攻撃連鎖の主要なリンクを切断する複数の改善策を同時に展開している。
GitHub Actions ワークフローのトリガー制御強化
エンタープライズ、組織、リポジトリレベルでワークフローを実行できるユーザーとトリガータイプを制限するポリシーを設定可能になる。これにより、CI/CD インフラの攻撃対象領域が縮小される。
信頼できないトリガーからのキャッシュ改ざん防止
信頼性の低いワークフローが共有キャッシュを修正する能力を制限し、キャッシュ汚染による権限昇格を防ぐ。これにより、限定的な脆弱性が高度に機密な認証情報の侵害につながる経路が閉塞される。
重要な引用
This delay allows maintainers time to respond and recover the account before their account can be used to start an attack.
We changed the default behavior of actions/checkout to prevent the checkout of untrusted code from forks in commonly exploited triggers unless you explicitly opt-out.
This new control lets you set enterprise, organization, or repository level policies on who is allowed to trigger workflows and what trigger types are allowed.
By decoupling the credentials used in CI/CD pipelines and automation from those that can publish to the registry, the attack chain from a CI/CD pipeline to malware distribution is cut off.
編集コメントを表示
編集コメント
サプライチェーン攻撃が常態化する中、GitHub が予防的なデフォルト設定へ舵を切ったことは業界全体に大きな影響を与える。開発者は今後はワークフローのリスク評価とオプトアウト判断が求められるため、セキュリティポリシーの見直しが必要となる。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
過去1年間、パッケージリポジトリやCI/CDシステムの脆弱性を狙ったサプライチェーン攻撃が頻発し、マルウェアが数百のオープンソースプロジェクトに急速に拡散する傾向が見られました。これらのマルウェアは、攻撃をさらに広めるため、あるいは将来的な悪用を狙って認証情報を窃取しようとしています。
私たちはこれまで、サプライチェーンの強化に向けた計画について何度か報告してきました。2025年9月の「より安全なnpmサプライチェーンへの道」、同年12月の「次期マルウェアキャンペーンに備えたサプライチェーンセキュリティの強化」、そして2026年3月の「GitHub Actions 2026セキュリティロードマップ」です。本稿では、最も一般的かつ影響度の高いサプライチェーン攻撃手法を直接無力化する、私たちが実施した変更内容についてご紹介します。
サプライチェーン攻撃の構造
サプライチェーン攻撃は複数の脆弱性を連鎖させるものであり、単一のセキュリティ機能で完全に阻止することはできません。これに対処するには包括的なアプローチが必要であり、攻撃連鎖の中で最も影響力のあるリンクを断ち切る対策に優先順位をつけることが重要です。私たちのチームはこの種の攻撃を継続的に研究し、その拡散を防ぎ影響を限定するための複数の改善策を実装してきました。これらの取り組みは、セキュリティ研究者や開発者コミュニティとの協力あってこそ可能になったものです。
ソフトウェアエコシステム内での攻撃の拡散方法は様々ですが、多くの場合、プロジェクトへの初期アクセス獲得、権限昇格、そしてユーザーやソフトウェアへの広範な配布において類似した手法が用いられています。ここ数ヶ月で npm と GitHub Actions に導入された改善点は、特定の一般的な攻撃経路を断ち切り、顧客がこれらの脅威を検知・対応できる仕組みを提供することに注力しています。
初期侵害
攻撃は通常、単一のプロジェクトから始まります。これは、メンテナのアカウントを直接乗っ取るか、プロジェクトの Actions ワークフローを標的にすることで行われます。
npm が高影響度アカウントに対して予防的な保護を追加(2026 年 6 月)
攻撃は頻繁に、メンテナを対象としたフィッシングキャンペーンから始まります。今回の変更により、高影響度の npm アカウントでは、メールアドレスの変更や 2FA リカバリーコードの使用時に 72 時間間、読み取り専用モードが適用されます。この猶予期間により、アカウントが悪用されて攻撃が始まる前に、メンテナが対応してアカウントを回復する時間を確保できます。
GitHub Actions の checkout における pull_request_target デフォルトの安全性向上(2026 年 6 月)
プロジェクトの CI/CD パイプラインでよく見られる脆弱性の一つに、「pwn リクエスト」と呼ばれるものがあります。これは、フォークからのプルリクエストをトリガーとしてワークフローが起動し、そのフォークから提出された信頼できないコードを実行してしまうケースです。
このたび、actions/checkout のデフォルト動作を変更しました。リスクを評価した上で明示的に除外しない限り、一般的に悪用されるトリガーにおいて、フォークからの信頼できないコードのチェックアウトを防ぐようにしています。この変更と、旧バージョンへのバックポートにより、GitHub Actions の CI/CD ワークフローでコード実行やプロジェクトの初期侵害につながる最も一般的な脆弱なコードパターンを断ち切ることができます。
誰が、何をトリガーとして GitHub Actions ワークフローを実行するかを制御する(2026 年 6 月)
もしかすると、こうしたリスクのあるアクショントリガー自体を除外したい、あるいはトリガーできる対象を制限したいと考えているかもしれません。新しい機能により、エンタープライズ、組織、リポジトリレベルで、誰がワークフローをトリガーできるか、またどのようなトリガータイプが許可されるかを設定できるようになりました。
これらのワークフロー実行ポリシーは、アクションワークフローの周りに管理可能でカスタマイズ可能な最小権限の層を提供し、CI/CD インフラストラクチャの攻撃対象領域を縮小します。
信頼できないトリガーに対する読み取り専用 Actions キャッシュ(2026 年 6 月): アタッカーが Actions ワークフロー内でコード実行を達成した後、共有されるキャッシュエントリを改ざんすることで、より権限の高いワークフロー(および認証情報)への昇格を図ります。今回の変更により、信頼度が低いワークフローが他のワークフローと共有するキャッシュを修正する能力を制限します。これにより、影響範囲の限られた脆弱性を悪用して、リリースや公開ワークフローで使われる高度に権限のある認証情報を侵害するという、アタッカーが頻繁に利用していた経路を直接的に塞ぎます。
認証情報の持ち出し
一度でも単一のパッケージへのアクセスを得たアタッカーは、さらなるアクセス獲得と他エコシステムでの後続の攻撃利用のために、認証情報を検知して外部へ持ち出すことに注力します。
npm の信頼済み公開機能に CircleCI がサポートされました(2026 年 4 月): これらの攻撃を阻止するために最も効果的な対策は、CI/CD パイプラインから長期有効な認証情報を排除することです。信頼済み公開機能は、長期有効な認証情報を使わずにパッケージリポジトリへの公開権限を与える優れた手段です。CircleCI を信頼済み公開プロバイダーとして追加したことで、これらの攻撃が狙う認証情報の削除をより多くの人々が実現できるようになりました。
アクションネットワークファイアウォール(技術プレビュー): この技術プレビューでは、アクションワークフローの実行から送信されるすべてのネットワークトラフィックをログ記録します。これにより、悪意のあるコードのダウンロードや、認証情報を新しいドメインへ転送するといった不審な動作を検出できます。今後の機能拡張では、ネットワーク出口制限とポリシーを有効化し、攻撃がさらに拡大したり認証情報が流出したりする前にブロックできるようになります。
攻撃の伝播
前段階で収集した認証情報を用いて、攻撃者は自らのマルウェアを拡散し、可能な限り速やかに他のプロジェクトやメンテナを乗っ取ろうとします。
npm における段階的公開(2026 年 5 月): 段階的公開を導入すれば、単に npm で新しいパッケージを公開するための認証情報を持っていればよいという状況はなくなります。公開されたパッケージは、追加の承認と npm CLI または npmjs.com での 2FA(多要素認証)が完了するまでステージング状態のままになります。このオプトイン型のセキュリティ制御により、メンテナは自分が公開したパッケージのすべてのバージョンが、この追加の承認プロセスを経たものであることを保証できます。CI/CD パイプラインや自動化で利用される認証情報と、レジストリへの公開権限を持つ認証情報を分離することで、CI/CD パイプラインからマルウェア配布に至る攻撃連鎖を断ち切ることができます。
npm v12(2026 年 6 月)の重要な変更点:攻撃者はマルウェアを素早く拡散させるため、パッケージが実行時にコードを実行するのを待つのではなく、インストール時のスクリプトを使って認証情報を盗み出します。これに対処するため、npm v12 ではデフォルトでこれらのインストールスクリプトを無効にする重大な変更を行います。インストールスクリプトには、多くの人気パッケージが依存しているパッケージインストールプロセス内で正当な用途があるため、特定のスクリプトを承認することで再度有効化できます。また、git やリモート URL 経由の依存関係をデフォルトで無効化することで、インストール時のコード実行に関する他の攻撃経路もブロックされます。
Dependabot のバージョン更新におけるデフォルトのパッケージ冷却期間(2026 年 7 月):攻撃者は速度に頼り、悪意のあるリリースが誰にも気づかれる前にできるだけ多くの下流プロジェクトに取り込まれることを狙います。これに対処し、Dependabot を介したバージョン更新では、リリースから少なくとも 3 日が経過するまでプルリクエストを開くのを待機するように変更されました。これにより、悪意のあるリリースがあなたのプロジェクトに到達する前に検知シグナルを表面化させる時間を確保できます。この冷却期間はデフォルトで有効ですが、セキュリティアップデートは即座に開かれるため、重要な修正が遅れることはありません。
サプライチェーン攻撃の特定と対応
npm と GitHub Actions のセキュリティ強化を進め、サプライチェーン攻撃の発生を抑えつつその影響を限定する取り組みと並行して、ユーザーが自らのプロジェクトやアカウントで起きたサプライチェーンインシデントを特定し、対応するための機能やツールの提供にも注力しています。
インシデント対応のためのセルフサービス資格情報失効(2026 年 6 月):サプライチェーン攻撃において GitHub の認証情報は依然として攻撃者の標的となっています。この新機能では、企業内の特定のユーザーに関連するすべての資格情報を即座に失効させるためのセルフサービスツールを提供します。これは 2 月に公開されたインシデント対応用の企業全体向けの資格情報管理ツールの機能を拡張したもので、サプライチェーン攻撃で認証情報が漏洩した場合でも、企業の管理者やメンバーが迅速に対応できるようになります。
資格情報失効 API のサポート拡大(2026 年 3 月):最近の攻撃では、公開されたコンテンツ内に認証情報を盗み出す手口も確認されています。こうした攻撃への対応を支援するため、個人用アクセストークン向けに 2025 年 4 月に導入した資格情報失効 API のサポート範囲を広げ、GitHub OAuth トークンや App トークンの失効にも対応できるようにしました。これにより、どこで漏洩が発見された場合でも、これらの認証情報を迅速かつセルフサービスで失効させることが可能になり、悪用される期間を最小限に抑えることができます。
今後の展望
npm と GitHub では、製品をデフォルトでより安全なものにすることが最優先課題です。私たちはこの取り組みを通じて、オープンソースエコシステム全体におけるサプライチェーン攻撃の標的を絞り込み、阻止することに注力しています。過去数ヶ月間でこの目標に向けて実現した成果には誇りを持っています。
まだ完了していませんが、これまでの進捗状況と、新たに利用可能になった機能についてお知らせしたいと考えました。今後の改善策の発表については、変更履歴(changelog)やブログ記事をぜひフォローしてください。
オープンソースソフトウェアは、私たち全員が恩恵を受ける素晴らしい公共財です。GitHub はこのように、オープンソースコミュニティとその依存企業に対するセキュリティ、持続可能性、そして継続的な成功を支えるための取り組みを続けています。
本記事「npm と GitHub Actions におけるサプライチェーン攻撃の阻止」は、The GitHub Blog に最初に掲載されました。
原文を表示
In the past year, there’s been a pattern of supply chain attacks that target weaknesses in package repositories and CI/CD systems to quickly spread malware to hundreds of open source projects. This malware seeks to exfiltrate credentials both to broadly spread the attack, as well as for later exploitation.
We’ve written a few times about our plans for hardening the supply chain: Our plan for a more secure npm supply chain in September 2025, Strengthening supply chain security: Preparing for the next malware campaign in December 2025, and What’s coming to our GitHub Actions 2026 security roadmap in March 2026. In this post, we’re updating you on changes we’ve implemented that directly disrupt some of the most common and impactful supply chain attack techniques.
Anatomy of supply chain attacks
Supply chain attacks chain together several weaknesses, and there is no single security capability that can stop them. Addressing them takes a holistic approach, prioritizing the mitigations that break the most impactful links in the attack chain. Our teams have been studying these attacks to deploy several improvements that disrupt them and limit their impact. This is possible thanks to collaboration with the security research and developer communities.
The attacks vary in how they spread across the software ecosystem. However, most of these attacks follow similar techniques to gain initial access to a project, escalate privileges, and distribute across users and software. Improvements made to npm and GitHub Actions in the past few months have been focused on cutting off specific, common techniques and providing ways for customers to identify and respond to these attacks.
Initial compromise
Attacks start by compromising a single project, often by directly compromising a maintainer’s account or by targeting the project’s actions workflows.
npm adds preventive account protection for high-impact accounts (June 2026): Frequently, attacks start with a phishing campaign targeting maintainers. With this change, high-impact npm accounts are now put into a read-only mode for 72 hours when they change their email or use a 2FA recovery code. This delay allows maintainers time to respond and recover the account before their account can be used to start an attack.
Safer pull_request_target defaults for GitHub Actions checkout (June 2026): A common vulnerability in a project’s CI/CD pipelines are “pwn requests,” where a workflow triggers on pull requests from forks and then executes user-submitted and untrusted code from that fork. We changed the default behavior of actions/checkout to prevent the checkout of untrusted code from forks in commonly exploited triggers unless you explicitly opt-out (after reviewing your risk). This change and its backport to older versions cut off one of the most common vulnerable code patterns leading to code execution in GitHub Actions CI/CD workflows and initial project compromise.
Control who and what triggers GitHub Actions workflows (June 2026): Maybe you’d prefer to opt-out of these risky action triggers altogether or limit who can trigger them. This new control lets you set enterprise, organization, or repository level policies on who is allowed to trigger workflows and what trigger types are allowed. These workflow execution policies provide a governable and customizable layer of least-privilege around Action workflows that reduce the attack surface of your CI/CD infrastructure.
Read-only Actions cache for untrusted triggers (June 2026): After an attacker has achieved code execution in an Actions workflow, they then look to escalate to more privileged workflows (and therefore credentials) through poisoning the cache entries shared across workflows. With this change, we restrict the ability for less trusted workflows to modify the cache shared with other workflows. This directly closes a common path attackers have used to turn a vulnerability with limited impact into one that compromises highly privileged credentials used by release and publishing workflows.
Exfiltrate credentials
Once an attacker has access to a single package, they then focus on detecting and exfiltrating credentials to gain further access and use in later exploitation across ecosystems.
npm trusted publishing now supports CircleCI (April 2026): The number one thing you can do to disrupt these attacks is to remove long-lived credentials from your CI/CD pipeline. Trusted publishing is a great way to authorize publishes to your package repository without a long-lived credential. By adding CircleCI as a trusted publishing provider, we’ve made it possible for more people to remove the credentials these attacks attempt to exfiltrate.
Actions network firewall (In technical preview): This technical preview logs all outbound network traffic from your Action workflow runs so you can detect unusual behavior like pulling down malicious code or exfiltrating credentials to a new domain. Future work will enable network egress restrictions and policies to block these attacks before they lead to further escalation and exfiltration.
Propagating the attack
With the credentials harvested from the previous step, attackers attempt to use those credentials to distribute their malware and compromise more projects and maintainers as quickly as possible.
Staged publishing for npm (May 2026): With staged publishing, it’s not enough to have credentials to publish a new package on npm; those packages are staged until additional approval and 2FA authentication is provided in the npm cli or on npmjs.com. This opt-in security control allows maintainers to ensure that any version of their package published has gone through this additional authorization. By decoupling the credentials used in CI/CD pipelines and automation from those that can publish to the registry, the attack chain from a CI/CD pipeline to malware distribution is cut off.
Upcoming breaking changes for npm v12 (June 2026): To spread their malware as quickly as possible, attackers use npm install-time scripts to exfiltrate credentials instead of waiting for code to be executed by the package at runtime. With npm v12, we are rolling out a breaking change that disables these install scripts by default. Since install scripts have legitimate use within the package installation processes that several popular packages rely on, you can reenable them by approving specific scripts. Additional vectors for install-time code execution have also been blocked by disabling dependencies via git or remote URLs by default.
Dependabot version updates introduce default package cooldown (July 2026): Attackers rely on speed, hoping a malicious release gets pulled into as many downstream projects as possible before anyone notices. Version updates through Dependabot now wait until a release has been available for at least three days before opening a pull request, giving detection signals time to surface before a malicious release reaches your project. This cooldown is on by default, and security updates still open immediately, so critical fixes are never delayed.
Identifying and responding to supply chain attacks
In parallel to hardening npm and GitHub Actions to disrupt and limit the impact of supply chain attacks, we have also been working on making features and tools available to users to identify and respond to supply chain incidents that have impacted their projects and accounts.
Self-service credential revocation for incident response (June 2026): GitHub credentials remain an ongoing target of attackers in supply chain attacks. This feature provides self-service tooling to instantly revoke all credentials for a given user in an enterprise. This builds on the enterprise-wide credential management tools for incident response released in February and allows enterprise admins and members to quickly respond if credentials have been compromised in a supply chain attack.
Expanded credential revocation API support (March 2026): Recent attacks have included exfiltrating credentials within publicly accessible content. To help the community respond to these attacks, we have expanded support of our credential revocation API (first introduced in April 2025 for personal access tokens) to support the revocation of GitHub OAuth and App tokens. This allows the quick and self-service revocation of these leaked credentials, regardless of where they are found, and limits the lifetime during which they can be abused.
What’s Next?
Making our products more secure by default is a priority across npm and GitHub and we are prioritizing this work to target and disrupt supply chain attacks across the open source ecosystem. We’re proud of the work we’ve shipped towards this goal over the past months. There’s more to come, but we wanted to provide an update on the progress we’ve made and make folks aware of the new capabilities available to them. Be sure to follow our changelog and blog posts as we continue to roll out improvements.
Open source software is an incredible public good that we all benefit from, and this is one of several ways GitHub is working to continue to support the security, sustainability, and continued success of open source communities and the enterprises that depend on them.
The post Disrupting supply chain attacks on npm and GitHub Actions appeared first on The GitHub Blog.
AI算出
主要ニュースainew評価標準
AI モデルや研究そのものではなく、インフラセキュリティの改善が主題のため ai_relevance は低めだが、具体的な脆弱性対策(pull_request_target デフォルト変更など)を明記しており新規性は高い。また、npm や GitHub Actions という明確な製品名が含まれるため検索機会スコアは高くなる。
6つの評価軸を見る
- AI関連度
- 25
- 情報源の信頼性
- 100
- 新規性
- 75
- 調べる価値
- 75
- 重複の少なさ
- 100
- 日本での有用性
- 25
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み