← All permissions
User permission·codespaces_user_secrets:write
Codespaces user secrets: Write
Tier 2 · Medium
Why Tier 2
Creates, overwrites and deletes secrets injected into the user's codespaces, and chooses which repositories get them. Adding a repository the caller controls hands the values to its dev container scripts the next time the user opens a codespace there.
- Target
- User
- 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 /user/codespaces/secrets/{secret_name}user access tokens only
- DELETE /user/codespaces/secrets/{secret_name}user access tokens only
- PUT /user/codespaces/secrets/{secret_name}/repositoriesuser access tokens only
- PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}also needs a permission GitHub's data does not nameuser access tokens only
- DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}also needs a permission GitHub's data does not nameuser access tokens only
Roles that include it
No built-in role includes it. Only tokens, Apps or custom roles can grant it.
Classic scopes that reach it
- T2codespacedocumented
- T2codespace:secretsdocumented
Attack paths
No attack technique, escalation or incident on ghtier goes through this yet.