DEV TOOLS Signal 414
GitHub Actions needs OIDC audience constraints
Illustration only Photo by Louis Hansel on Unsplash
GitHub Actions' OIDC token implementation allows jobs with id-token:write to request tokens for any audience at runtime, creating a cross-service pivot risk that static audience declarations would prevent.
Any job that runs third-party code and holds id-token:write can mint OIDC tokens for arbitrary audiences, meaning a single compromised dependency or malicious action can federate access to services the job was never intended to reach. This undermines the defense-in-depth that the aud claim is supposed to provide in OIDC-based federation.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
GitLab CI/CD requires OIDC audiences to be declared statically in the pipeline definition, while GitHub Actions lets jobs request any audience at runtime via HTTP.
The id-token:write permission in GitHub Actions grants unrestricted audience minting, so any code executing in that job can obtain tokens for services beyond its intended scope.
A proposed syntax change to permissions (e.g., id-token: [pypi]) would constrain which audiences a job can request, though the author acknowledges backend implementation would be nontrivial.
THE CLUSTER