Join our Newsletter — 33% off our NHI Course

How should security teams govern OIDC and workload tokens in release pipelines?

Treat OIDC and other workload tokens as privileged identities with explicit audience, repository, and job restrictions. Do not grant broad federation by default. Pair token scoping with workload segregation, so a compromised job cannot reuse its identity to publish code, access cloud services, or move into adjacent pipelines.

Why This Matters for Security Teams

OIDC and workload tokens in release pipelines are not just implementation details. They are production-grade identities that can publish artifacts, assume cloud roles, trigger deployments, and reach adjacent systems. If those tokens are broad, long-lived, or reusable across jobs, a single compromised runner can become a supply chain foothold. That is why current guidance treats pipeline tokens as privileged machine identities, not disposable build metadata.

Security teams often get this wrong by focusing on whether a token is “temporary” while ignoring what it can do during its lifetime. The real risk is trust expansion across repositories, environments, and tooling layers. NHIMG’s Guide to the Secret Sprawl Challenge shows how quickly machine credentials accumulate once pipelines are allowed to mint and forward them by default. The same pattern appears in OAuth-style abuse cases such as the Salesloft OAuth token breach, where token scope became the attack surface.

In practice, many security teams discover excessive pipeline trust only after a runner has already used its identity to reach code signing, cloud APIs, or deployment credentials.

How It Works in Practice

Governance starts by treating each release job as its own workload identity boundary. The preferred model is narrow federation: the token should be bound to a specific repository, branch, workflow, and audience, with expiry measured in minutes rather than days. That aligns with workload identity principles in the SPIFFE workload identity specification, even when the implementation uses OIDC rather than SPIFFE/SPIRE directly.

At runtime, the pipeline should request only the claims needed for one task. For example, a build job may need read-only artifact registry access, while a publish job needs a narrowly scoped release role. Those identities should not be interchangeable. Use policy checks to validate repository, workflow name, environment, and subject before the cloud side issues a session. Where possible, pair this with just-in-time credential issuance and automatic revocation when the job completes.

  • Bind tokens to a single repository and workflow, not an organisation-wide trust relationship.
  • Set explicit audience restrictions so a token minted for one service cannot be replayed elsewhere.
  • Use short TTLs and job-level revocation, especially for publish and deploy stages.
  • Separate build, test, release, and promotion identities so compromise does not cross stages.
  • Log token issuance, claim evaluation, and downstream role assumption for audit and detection.

NHIMG’s CI/CD pipeline exploitation case study and Reviewdog GitHub Action supply chain attack both reflect the same lesson: runners become high-value identities when they can mint or forward credentials without strict context checks. These controls tend to break down in shared runners and multi-tenant build clusters because the job boundary is weak and token reuse becomes operationally convenient.

Common Variations and Edge Cases

Tighter token scoping often increases release friction, requiring organisations to balance deployment speed against blast-radius reduction. That tradeoff is real, especially in monorepos, reusable workflow libraries, and multi-cloud delivery chains where one pipeline may legitimately publish to several targets.

Current guidance suggests that shared OIDC issuers are acceptable only when downstream policy can still distinguish jobs precisely. There is no universal standard for this yet, so teams should prefer explicit claim mapping over implicit trust. For example, a token tied to “main” may still be too broad if multiple release paths run from that branch.

Two edge cases matter most. First, ephemeral does not mean safe if the token can be replayed during its TTL or exchanged for a longer-lived session. Second, token scoping alone is insufficient if the runner image, secrets store, or artifact path is already compromised. NHIMG’s Top 10 NHI Issues and Guide to SPIFFE and SPIRE are useful references for separating identity, workload, and secret handling concerns. Use NIST Cybersecurity Framework 2.0 to anchor governance in asset inventory, access control, and monitoring rather than relying on token lifetime alone.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10, CSA MAESTRO and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 A2 Pipeline tokens can be abused by autonomous tooling and chained actions.
CSA MAESTRO AI-2 MAESTRO addresses identity and authorization for agentic and automated workloads.
NIST AI RMF GOVERN Governance is needed for high-impact automated release identities and decisions.
OWASP Non-Human Identity Top 10 NHI-01 OIDC workload tokens are non-human identities that must be tightly controlled.
NIST Zero Trust (SP 800-207) PR.AC-1 Zero trust requires continuous verification of workload identity and context.

Assign ownership, review, and accountability for every pipeline token path.