Subscribe to the Non-Human & AI Identity Journal
Home FAQ Authentication, Authorisation & Trust What should security teams do about short-lived CI/CD…
Authentication, Authorisation & Trust

What should security teams do about short-lived CI/CD workloads?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated July 28, 2026 Domain: Authentication, Authorisation & Trust

They should design for identity that appears and disappears with the job, not for identity that assumes a long-lived service. If registration and attestation take too long, the runner finishes before governance becomes effective. That means timing, not just policy, is part of the control design.

Why This Matters for Security Teams

Short-lived CI/CD runners are not just “temporary servers.” They are autonomous workloads that appear, do a narrow set of high-privilege tasks, and disappear before traditional governance can catch up. That makes static service accounts, reused tokens, and pre-provisioned secrets a poor fit. The security problem is not only what the workload can access, but whether identity, attestation, and policy evaluation can complete fast enough to matter.

This is where teams often misjudge the control point. A pipeline may look low risk because each job is ephemeral, yet ephemeral execution can still pull secrets, sign artifacts, push images, and mutate infrastructure at machine speed. NHIMG’s Guide to the Secret Sprawl Challenge shows why secrets left in build systems and automation paths become systemic exposure, not isolated mistakes. Current guidance suggests treating CI/CD identity as a workload identity problem, not a user admin problem, and validating it against standards like the SPIFFE workload identity specification.

In practice, many security teams encounter credential reuse and overbroad pipeline access only after a build agent has already signed, exfiltrated, or deployed something it should never have touched.

How It Works in Practice

The practical model is identity that is issued for the job, bound to the runtime, and revoked when the job ends. That usually means using workload identity rather than long-lived secrets, with attestation proving what the runner is before it receives any privilege. For CI/CD, the runner should authenticate to a trust broker, receive a short-lived token or certificate, and then use that identity only within a narrow policy window.

In NHI terms, this aligns with ephemeral, just-in-time access design. NHIMG’s Guide to SPIFFE and SPIRE is a useful reference point for teams moving from static secrets to cryptographic workload identity. The key operational shift is that policy is evaluated at request time, not at account creation time. That means the pipeline’s identity can be tied to repo, branch, commit, environment, build provenance, and deployment target before any secret is released.

  • Use short TTL credentials for the narrowest possible stage, not for the full pipeline lifetime.
  • Bind identity to runner attestation, image provenance, or OIDC-backed workload claims where possible.
  • Separate build, test, and deploy identities so compromise in one stage does not cascade.
  • Replace shared credentials with per-job tokens and automatic revocation.
  • Log identity issuance and secret access as security events, not just DevOps telemetry.

Where teams need a deeper control model, policy-as-code can enforce context-aware decisions using branch trust, environment sensitivity, and artifact state at runtime. These controls tend to break down when self-hosted runners are long-lived, multi-tenant, or allowed to cache credentials across jobs because the trust boundary stops being per-job and becomes per-host.

Common Variations and Edge Cases

Tighter pipeline identity controls often increase operational friction, requiring organisations to balance build speed against trust depth. That tradeoff is real, especially in high-frequency delivery environments where engineers expect runners to start instantly and finish within seconds. Best practice is evolving, but there is no universal standard for how much attestation, policy evaluation, and token issuance latency is acceptable for every pipeline.

Edge cases usually appear when CI/CD workloads span multiple trust zones. For example, a job may start in one account, fetch artifacts from another, and deploy into a third. In those cases, a single identity is too coarse. Teams should prefer segmented identities, narrower audience claims, and separate trust policies per environment. It also matters whether the runner is ephemeral in name only. A container that is restarted from a warm pool, or a VM image that persists cached tokens, is not truly short-lived from a risk perspective.

For agentic or highly automated pipelines, the same concern applies to tool chaining: if one step can request secrets for the next step without fresh evaluation, the control is already weakened. NHIMG’s CI/CD pipeline exploitation case study is a reminder that attackers often abuse orchestration assumptions, while the The 2024 State of Secrets Management Survey reports that 88% of security professionals are concerned about secrets sprawl. That concern becomes urgent when the workload finishes before registration, attestation, or revocation can complete.

Standards & Framework Alignment

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

OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and CSA MAESTRO 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.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01Short-lived CI/CD jobs need ephemeral workload identity instead of shared secrets.
OWASP Agentic AI Top 10A1Autonomous pipeline steps need runtime authorization, not static access assumptions.
CSA MAESTROTR-2MAESTRO addresses trust and runtime control for autonomous and ephemeral workloads.
NIST AI RMFGOVERNAI RMF governance principles fit automated workloads that can act faster than manual review.
NIST Zero Trust (SP 800-207)3.1Zero Trust requires verifying each workload request, not trusting the runner by location.

Tie pipeline trust to attestation, short-lived identity, and stage-specific policy checks.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on July 28, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org