Environment-Scoped Secret とは?
environment-scoped secret は、repository や組織全体ではなく特定の deployment environment に付与された secret です。job はその environment に対して実行されるときにのみアクセスを得られ、environment の保護ルールによって事前の承認を要求することもできます。これにより本番の認証情報を日常的なテスト job から遠ざけられます。
なぜ重要か
テストや preview の job が本番の secret を必要とすることはめったになく、それでも付与すると偶発的な誤用を招きます。secret を environment に紐づけることで、アクセスを意図的な deployment に結び付けられます。
関連ガイド
What Is a Pipeline Secret Scope?A pipeline secret scope defines which jobs, stages, or environments may read a given secret, narrowing exposu…
What Is an Organization Secret?An organization secret is a credential defined once at the org level and shared across many repositories, avo…
What Is a Repository Secret?A repository secret is a credential stored on a single repository and available to its workflows, keeping a p…