Environments: Write
Why Tier 1
Creates, overwrites and deletes environment secrets and variables, which production deploy jobs read. Required reviewers do not guard the secrets themselves: a job waits for approval, but the values in it are whatever this wrote. The protection rules belong to Administration.
Data plane permissions start at Tier 2. This one is raised for the reason above.
- Target
- Repository
- Plane
- DataSecrets: Actions, environment, Dependabot, Codespaces and agent secrets, private registries and OIDC.
- Granted by
- Fine-grained PAT, GitHub App
- Available on
- Every setup
What it unlocks
5 REST endpoints need this permission, from GitHub's docs data. Some also need another permission, and a few work with only one kind of token.
- PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
- DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
- POST /repos/{owner}/{repo}/environments/{environment_name}/variables
- PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
- DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
Roles that include it
No built-in role includes it. Only tokens, Apps or custom roles can grant it.
Custom role permissions that add it
An owner can build a custom role from these on Enterprise Cloud. Nobody holds one until a custom role with it is assigned.
- Manage environments (including environment secrets and variables)
write_repository_actions_environmentsrepository role
Classic scopes that reach it
- T0repodocumented
Attack paths
No attack technique, escalation or incident on ghtier goes through this yet.