GitHub ホストレジストリへの自動 Dependabot アクセス機能の追加
GitHub は、Dependabot がプライベートパッケージレジストリへのアクセスにパーソナルアクセストークン(PAT)を不要とし、アクション権限管理を通じて自動でアクセスできるように機能拡張を行った。
キーポイント
トークン不要化の導入
Dependabot がプライベート GitHub Packages や ghcr.io からパッケージを読み取る際、従来の PAT 設定が不要となり、GITHUB_TOKEN を自動的に利用するようになった。
アクセス権限の一元管理
パッケージ設定内の「Manage Actions access」でリポジトリに Read 権限を付与することで、Dependabot のアクセスが許可され、ワークフローと同様の挙動をする。
設定の簡素化とセキュリティ向上
dependabot.yml の変更や PAT の管理が不要になり、トークンの漏洩リスクを低減しつつ、すべての対応エコシステムで即座に利用可能となった。
影響分析・編集コメントを表示
影響分析
この変更は、DevOps およびセキュリティチームにとって、依存関係管理ツールの設定コストを大幅に削減し、トークン漏洩という重大なリスク要因を排除する画期的な改善です。特に大規模なプライベートパッケージ運用環境において、認証プロセスの自動化と標準化が促進され、サプライチェーンセキュリティの強化に直結します。
編集コメント
セキュリティリスクを減らしつつ運用効率を上げる、極めて実用的な改善です。PAT の管理から解放されることで、チームはより本質的なコード品質向上に注力できるようになります。
Dependabot は、パーソナルアクセストークンなしでプライベートな GitHub Packages レジストリから読み込みが可能になりました。パッケージ設定の「Manage Actions access」を通じてリポジトリへのアクセス権限が付与されている場合、Dependabot はその権限を再利用します。
何が変わったか
Dependabot の GITHUB_TOKEN は now パッケージの読み取りを要求できるようになり、*.pkg.github.com や ghcr.io からのプル時にこのトークンが送信されます。「Manage Actions access」を通じてリポジトリへのアクセス権限が付与されているパッケージは、通常の GitHub Actions ワークフローと同じくこれを許可します。
これは Dependabot がサポートするすべての GitHub Packages エコシステムで利用可能です。
有効化方法
Dependabot が読み込む必要がある各パッケージについて:
- パッケージの設定ページを開きます(組織アカウントまたは個人アカウントの「Packages」タブの下にあります)。
- 「Manage Actions access」セクションで、Dependabot を実行するリポジトリに「Read」アクセス権限を追加します。
dependabot.yml の変更は不要です。これらのパッケージのために追加した PAT ベースのレジストリエントリは削除できます。
さらに詳しく
ワークフローからのパッケージへのアクセス確保
Dependabot 用のプライベートレジストリへのアクセス設定
この投稿「Automatic Dependabot access to GitHub-hosted registries」は、The GitHub Blog で最初に公開されました。
原文を表示
Dependabot can now read from private GitHub Packages registries without a personal access token. If a package has granted your repository access through “Manage Actions access” in the package settings, Dependabot reuses that grant.
What’s new
Dependabot’s GITHUB_TOKEN can now request packages: read, and Dependabot jobs send that token when pulling from *.pkg.github.com and ghcr.io. Any package that has granted your repository access through “Manage Actions access” will accept it, the same as a regular GitHub Actions workflow.
This is available for every GitHub Packages ecosystem that Dependabot supports.
How to enable it
For each package Dependabot needs to read:
Open the package’s settings page (under your organization’s or personal account’s Packages tab).
Under “Manage Actions access”, add the repository that runs Dependabot with Read access.
You don’t need to change dependabot.yml, and you can remove any PAT-based registry entries you added for these packages.
Learn more
Ensuring workflow access to your package
Configuring access to private registries for Dependabot
The post Automatic Dependabot access to GitHub-hosted registries appeared first on The GitHub Blog.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み