# OIDC ID token: Write (repository)

Tier 1 permission, `permission:id_token:write`. Page: https://ghtier.com/tier/permissions/id-token-write

Lets the job request an OIDC token. The token grants nothing on GitHub; a cloud role whose trust policy accepts it hands out credentials. What the job gets is that role's permissions, and which jobs get it depends on how closely the policy matches the subject and audience.

**Keys and policies that act as or change it:** [Cloud OIDC trust policy for GitHub Actions](https://ghtier.com/tier/keys-policies/cloud-oidc-trust.md) (Tier 1)

**Enables techniques:** [Run PR code in a privileged workflow](https://ghtier.com/attack-paths/technique-pwn-request.md) (Tier 1)

**Ways in that use it:** [Untrusted input reaches a privileged workflow](https://ghtier.com/attack-paths/untrusted-input.md) (Tier 1)

**Gained through escalations:** [Change a workflow, get its secrets](https://ghtier.com/attack-paths/escalation-workflow-to-secrets.md) (Tier 1), [Create a deployment that starts the deploy workflow](https://ghtier.com/attack-paths/escalation-deployment-to-deploy-job.md) (Tier 1), [Sign provenance for your own artifact](https://ghtier.com/attack-paths/escalation-workflow-to-attestation.md) (Tier 1)

**Abused in incidents:** [Actions cache poisoning (Angular, TanStack)](https://ghtier.com/incidents/cache-poisoning.md), [Megalodon: mass backdooring of CI workflows](https://ghtier.com/incidents/megalodon.md)

**Sources:**
- [GitHub docs](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions)

From ghtier (https://ghtier.com). Every entry and link: https://ghtier.com/data/graph.json. Tiers: https://ghtier.com/tier.
