Skip to content
Nicolas Chiong· 4 min read

A checklist for GitHub Actions immutable OIDC subjects

GitHub's immutable OIDC subject claims reduce repo-name reuse risk, but teams need to update cloud trust policies before flipping the switch.

GitHub Actions OIDC is one of the cleaner ways to remove cloud credentials from CI. The weak spot has been identity drift: many trust policies matched repository and organization names, and names can be renamed, transferred, or recycled. GitHub's immutable subject claims are a small change with a real security payoff.

What changed

GitHub's April 2026 changelog announced immutable identifiers in the default OIDC subject claim for new repositories, with the automatic rollout dated July 15, 2026. The docs now describe the new shape: repositories created after that date use a subject value that includes both the owner ID and repository ID. Existing repositories keep the older name-based format unless they opt in.

The old pattern looked like this:

repo:octo-org/octo-repo:ref:refs/heads/main

The immutable pattern includes IDs:

repo:octo-org@123456/octo-repo@456789:ref:refs/heads/main

That is not just formatting. The claim becomes tied to stable GitHub identities instead of mutable display names. If a repository name is later reused by someone else, a cloud role that expects the old immutable IDs should not trust the new repository.

The lazy migration path

I would not start by editing every trust policy. Start by finding where OIDC is already used.

  1. Search workflows for id-token: write.
  2. List the cloud roles, service accounts, or vault roles they authenticate into.
  3. Capture the current sub conditions for each environment.
  4. Preview or inspect the immutable subject value for one repository.
  5. Add the new condition beside the old one where the provider allows it.
  6. Run one deployment.
  7. Remove the old name-only condition after the new path works.

That is the smallest safe path. The mistake is treating this as a GitHub-only setting. The GitHub toggle changes the token. The cloud provider decides whether that token is accepted.

What to check before opting in

The practical review is about blast radius.

CheckWhy it matters
Repository ageExisting repositories do not switch unless opted in
Rename historyRenamed repos are exactly where name-based trust is fragile
Cloud provider condition syntaxAWS, Azure, GCP, and Vault express subject matching differently
Environment subjectsJobs using environments have a different subject context
Reusable workflowsCustom subjects may include job_workflow_ref
Break-glass pathA failed condition can block deploys

GitHub's OIDC reference also points out that subject and audience claims are usually used together. Keep that pairing. The immutable subject narrows which workflow identity is trusted. The audience still helps prevent a token minted for one recipient from being accepted by another.

Custom subjects need extra care

Some organizations already customize OIDC subject claims. For example, they may require a reusable deployment workflow or include repository metadata in the subject. GitHub's REST API docs now include a use_immutable_subject option for repository customization.

That means there are two different questions:

  1. Should this repository use immutable owner and repo IDs?
  2. Should this organization also require custom claims such as job_workflow_ref?

Do not collapse those into one migration. First make the existing trust relationship stable. Then decide whether reusable workflow enforcement is worth the extra coordination.

This is similar to the release hardening I want in JavaScript dependency work. My dependency role audit for JavaScript production builds was about reducing ambiguity before release. OIDC subject hardening does the same thing for deployment identity.

The rollout I would use

For production repositories, I would opt in during a normal deploy window, not during an incident. I would also avoid changing branch filters, environment requirements, and immutable subjects in the same pull request. One trust-axis change at a time is enough.

A good acceptance test is concrete:

  1. The workflow requests an OIDC token with id-token: write.
  2. The token subject has the expected immutable owner and repo IDs.
  3. The cloud role accepts the immutable subject.
  4. The old name-only subject is no longer required.
  5. A repository rename would not accidentally preserve access through name reuse.

The takeaway

Immutable OIDC subjects are not a new deployment platform. They are a sharper identity string. That is exactly why they are worth doing. The forward-looking move is to inventory OIDC trust policies now, migrate the repositories that can reach production first, and leave fewer cloud roles trusting names that can change hands.

github-actionsoidccisecurity

References

  1. github.blogGitHub Changelog
  2. docs.github.comGitHub Docs
  3. docs.github.comGitHub Docs

Related writing

← PreviousA triage playbook for GitHub issue automation controls

Let's make something useful.

Start a conversation