{
  "id": 17336129,
  "title": "Make GitHub Actions OIDC trust depend on the claims you can enforce",
  "url": "https://urgent.news/2026/10/31/make-github-actions-oidc-trust-depend-on-the-claims-you-can-enforce",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-31T04:23:52.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ioneyrezende/make-github-actions-oidc-trust-depend-on-the-claims-you-can-enforce-1m89"
  },
  "original_language": "en",
  "account": "GitHub Actions can leverage OpenID Connect (OIDC) tokens to obtain cloud access without storing long-lived secrets in repositories. The security relies on a trust policy determined outside GitHub, which specifies which token subjects and audiences are authorized to assume particular roles. The subject claim in an OIDC token can identify the repository and context, and organizations can customize this to require specific claims. Different types of workflows, such as pull request, branch, environment jobs, and reusable workflows, can generate varying context for the subject claim. It is crucial to thoroughly review the actual claim for each trusted path.\n\nGitHub provides an OIDC debugger action to visualize claims before integrating a cloud provider. A weak trust policy that relies on broad patterns may inadvertently include workflows the role owner did not intend. When testing the trust policy, it is essential to use a non-production role and evaluate the actual claim for each trusted path. The cloud trust policy should encompass the issuer, audience, subject, and any provider-specific conditions that distinguish the intended workflow.\n\nTo enhance security, the cloud trust policy should combine the issuer, audience, subject, and any provider-specific conditions. It is advisable to use repository owners and identities rather than just human-readable names, especially when immutable repository identifiers are supported. Incorporating environment protection rules when a workflow utilizes an environment can provide stronger trust conditions. Separate deployment roles by environment and purpose, ensuring that a production deployment role is not assumable by every branch or pull request workflow. Similarly, a read-only inventory job should not receive a role with infrastructure-changing capabilities.\n\nThe cloud provider's session policy can further narrow the token exchange. As workflows may change, it is vital to review actions receiving the OIDC token and treat such changes as security-sensitive. Ensure actions are pinned to reviewed versions, limit workflow permissions, and avoid passing unnecessary tokens to steps that do not require them. Although the OIDC token is short-lived, the resulting cloud session could outlive the job, making it essential to log the assumed role and the token claims accepted by the provider. Avoid logging the token itself and set up alerts for new subjects assuming sensitive roles, unexpected audiences, or roles assumed from typically non-cloud-access workflows. Rigorous testing should be conducted to ensure that attempts from untrusted branches, workflows lacking required environments, different reusable workflows, and tokens with incorrect audiences all fail. Subsequently, confirm that the intended workflow results in a cloud session with only the necessary permissions.",
  "summary": "Make GitHub Actions OIDC trust depend on the claims you can enforce GitHub Actions can obtain a short-lived OpenID Connect token and exchange it for cloud access without storing a long-lived cloud secret in the repository. The convenience shifts the security question to the trust policy outside GitHub. That policy must decide which token subjects and audiences are allowed to assume which role.…",
  "key_points": [
    "GitHub Actions can use OIDC tokens for cloud access without storing secrets.",
    "Organizations can customize subject claim to require specific claims.",
    "Rigorous testing ensures only trusted workflows receive cloud sessions."
  ],
  "editors_take": "Granular control over OIDC claims allows organizations to move beyond broad repository access toward a model where specific workflow contexts and environment protections dictate cloud permissions.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}