action の SHA 固定 - CI/CD用語集の定義
action の SHA 固定は、コードが密かに変わらないよう、action を完全な commit SHA で参照します。
action の SHA 固定とは、可変の tag ではなく、完全な commit SHA (例えば actions/checkout@<40-char-sha>) でサードパーティの action を参照することであり、正確なコードが知らないうちに変わることを防ぎます。
@v4 のような tag は、新しいコードを指すように移動できます。不変の 40 文字の commit SHA に固定することで、監査した action が実行される action であることが保証されます。
例
.github/workflows/ci.yml
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0関連ガイド
Action (GitHub Actions) - CI/CD Glossary DefinitionAction (GitHub Actions): An action is a packaged, reusable unit of workflow automation referenced with `uses:…
Workflow Permissions - CI/CD Glossary DefinitionWorkflow Permissions: Workflow permissions set the access scopes granted to `GITHUB_TOKEN` via the `permissio…