Interview Prep/GitHub Actions/OIDC & Security Hardening

How does GitHub OIDC work, end to end?

IntermediateConceptOIDC & Security Hardening
Answer
  1. The job has permissions: id-token: write, so the runner gets ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN.
  2. An action requests a JWT from https://token.actions.githubusercontent.com with an audience.
  3. GitHub signs a token with claims: iss, aud, sub, repository, ref, environment, job_workflow_ref, run_id, actor, and more; valid for minutes.
  4. The cloud provider validates signature and claims against a configured identity provider and trust conditions.
  5. It returns short-lived credentials (AWS STS, Azure AD, GCP STS) scoped to a role.

No long-lived keys exist in GitHub, and stolen tokens expire quickly.

All GitHub Actions questions Roadmap: GitHub Actions

More on OIDC & Security Hardening