workflow パーミッション - CI/CD用語集の定義
workflow パーミッションは、組み込みの GITHUB_TOKEN が run 内で何を行えるかを制御します。
workflow パーミッションは permissions: キーで設定して自動の GITHUB_TOKEN を絞り込み、contents: read や pull-requests: write のようにリソースごとのアクセスを付与します。これを明示的に宣言すると最小権限が強制されます。
デフォルトの制限
workflow の先頭で permissions: {} または contents: read を設定すると、その他すべてのデフォルト付与が外れます。リポジトリは Settings でトークンをデフォルトで読み取り専用にし、必要な job だけ追加のアクセスをオプトインすることもできます。
関連ガイド
Read-Only Token - CI/CD Glossary DefinitionRead-Only Token: A read-only token grants read access without write, for example `contents: read`. Configurin…
Token Scope - CI/CD Glossary DefinitionToken Scope: A token scope is a permission attached to a credential that bounds what it can do, such as `repo…
Repository Secret - CI/CD Glossary DefinitionRepository Secret: A repository secret is an encrypted key/value stored on a single repo and exposed to its w…