Organization codespaces secrets: Write
Why Tier 2
Creates, overwrites and deletes secrets injected into members' codespaces, and chooses which repositories get them. A codespace on such a repository has the value as an environment variable, which the repository's dev container scripts can read. Unlike Actions and Dependabot secrets, nothing deploys or resolves dependencies with them on its own; they reach a developer's environment.
- Target
- Organization
- Plane
- DataSecrets: Actions, environment, Dependabot, Codespaces and agent secrets, private registries and OIDC.
- Granted by
- Fine-grained PAT, GitHub App
- Available on
- Free, Team, Enterprise Cloud, EMU
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 /orgs/{org}/codespaces/secrets/{secret_name}
- DELETE /orgs/{org}/codespaces/secrets/{secret_name}
- PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories
- PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}also needs a permission GitHub's data does not name
- DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}also needs a permission GitHub's data does not name
Roles that include it
No built-in role includes it. Only tokens, Apps or custom roles can grant it.
Classic scopes that reach it
- T0admin:orgdocumented
Attack paths
No attack technique, escalation or incident on ghtier goes through this yet.
Other levels
GitHub Docs: Organization permissions for "Organization codespaces secrets"