GitHub

GitHub Actions

GitHub Actions OIDC tokens for a repository's workflows.

GitHub Actions can mint OIDC tokens for a repository's workflows. Tokens always come from https://token.actions.githubusercontent.com. The audience is the GitHub organization or user that owns the repository. You can also require a branch, tag, or environment.

Docs and discovery

DocsAbout security hardening with OpenID Connect
ClaimsOIDC token claims
Issuerhttps://token.actions.githubusercontent.com
Discoveryhttps://token.actions.githubusercontent.com/.well-known/openid-configuration

Token

Issuerhttps://token.actions.githubusercontent.com
Audiencehttps://github.com/<owner>
Repositoryowner/repo
Branchref is refs/heads/<name>
Tagref is refs/tags/<name>
Environmentenvironment

A token names either a ref or an environment, not both.

Fields

FieldClaimRequiredValidation
Repositoryaud, repositoryYesowner/repo, a GitHub URL, or an SSH remote.
Scope byNoAny ref, or a branch, tag, or environment.
Branch / tag / environmentref or environmentWhen scopedShown when you pick a scope.
Additional claimsotherNoCannot reuse aud, repository, ref, or environment.

You can paste a GitHub link into Repository. A /tree/<branch> link also sets the branch. A /releases/tag/<tag> link sets the tag.

The form pins aud to https://github.com/<owner>, the default audience. If your workflow requests a custom audience, edit compile in the installed file — Additional claims cannot reuse aud.

Example policy

{
  issuer: "https://token.actions.githubusercontent.com",
  claims: {
    aud: ["https://github.com/acme"],
    repository: ["acme/web"],
    ref: ["refs/heads/main"],
  },
}

Add a field

Edit components/oidc/provider-github.tsx after install. For a one-off claim such as workflow_ref, use Additional claims. For its own input, add it to Fields (or schema), DEFAULTS, compile, parse, FIRST_CLASS_CLAIMS, and the form.

See Add a field.