Skip to content

Commit 31c2451

Browse files
committed
Document immutable subject claims for GitHub Actions OIDC tokens
1 parent 8ad879c commit 31c2451

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

content/actions/concepts/security/openid-connect.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,26 @@ The following example OIDC token uses a subject (`sub`) that references a job en
8888
}
8989
```
9090

91+
{% ifversion fpt or ghec %}
92+
93+
### Immutable subject claims
94+
95+
To protect against attacks that rely on recycling repository or organization names, the default subject (`sub`) claim includes an immutable numeric ID for both the repository owner and the repository. Unlike names, these IDs never change, and they are never reused if an account or repository is deleted. This ensures that a subject claim always refers to the same repository, even if the organization or repository is later renamed or its name is claimed by a different account.
96+
97+
The immutable ID is appended to each name with an `@` delimiter. For example, the subject claim for the `main` branch of the `octocat/my-repo` repository looks like this:
98+
99+
```text
100+
repo:octocat@123456/my-repo@456789:ref:refs/heads/main
101+
```
102+
103+
In this example, `123456` is the immutable ID of the `octocat` owner and `456789` is the immutable ID of the `my-repo` repository. This replaces the earlier format that referenced only the mutable names, such as `repo:octocat/my-repo:ref:refs/heads/main`.
104+
105+
Immutable subject claims are enabled by default for repositories created on or after July 15, 2026, and for repositories that are renamed after that date. Organization and repository administrators can opt existing repositories in earlier from the Actions OIDC settings, using either the settings UI or the REST API.
106+
107+
Before your workflows use immutable subject claims, update the trust conditions on your cloud provider so that they match the new subject format. To help you make this change with confidence, you can preview the subject claim prefix that your repository will use under the new format before it takes effect.
108+
109+
{% endif %}
110+
91111
{% ifversion ghec %}
92112

93113
## Establishing OIDC trust with your cloud provider

0 commit comments

Comments
 (0)