Join our Newsletter — 33% off our NHI Course

Why do CI runners increase non-human identity risk?

CI runners act on behalf of repositories, but they often receive tokens, cloud keys, and deployment credentials that outlive a single job. If those permissions are broad, a compromise turns one build into a credential-harvesting opportunity. Runners therefore need lifecycle scoping, secret minimisation, and revocation just like any other privileged non-human identity.

Why This Matters for Security Teams

CI runners are not just build infrastructure. They are privileged non-human identities that routinely receive access to source code, registries, cloud APIs, deployment targets, and signing workflows. That makes them a high-value bridge between software supply chain activity and production access. When a runner is compromised, the attacker is often not limited to the failing job. They can harvest tokens, move laterally into adjacent systems, and reuse valid credentials outside the CI context.

This is why runner risk is different from ordinary server hardening. Security teams often treat CI as a pipeline reliability problem, but the real issue is identity scope and credential lifecycle. NHI Management Group notes in the Ultimate Guide to NHIs that 97% of NHIs carry excessive privileges, which helps explain why compromised automation becomes a broad blast-radius event rather than a contained failure. Current guidance also aligns with the NIST Cybersecurity Framework 2.0 emphasis on controlled access and recoverability.

In practice, many security teams encounter runner abuse only after a secret has already been exfiltrated from a build log, cache, or deployment step.

How It Works in Practice

The safest way to think about a CI runner is as a short-lived workload identity that should receive only the credentials required for one job, for one environment, for one purpose. That means shifting away from long-lived static secrets and toward ephemeral, task-bound access. In mature setups, the runner proves its workload identity first, then requests just-in-time credentials that expire when the job ends or the deployment completes.

This model works best when authorisation is evaluated at request time rather than pre-assigned in a broad role. For example, a runner building a feature branch should not automatically have the same access as a runner promoting a release candidate. Runtime policy can distinguish the repository, branch, environment, approver state, artifact hash, and target account before issuing access. That is consistent with the direction outlined by Top 10 NHI Issues and with NIST Cybersecurity Framework 2.0 controls for least privilege, logging, and recovery.

  • Bind the runner to a workload identity, not to a reusable human-style account.
  • Issue secrets per job, with short TTLs and automatic revocation on completion.
  • Separate build, test, and deploy permissions so a compromise in one phase does not inherit the others.
  • Store secrets outside code and logs, and block plaintext exposure in artifacts and caches.
  • Audit token use by repository, pipeline stage, and target environment.

Where possible, use policy-as-code to gate cloud access, registry pushes, and deployment actions at runtime. These controls tend to break down when runners are shared across many repositories because identity attribution, secret cleanup, and revocation become too coarse to trust.

Common Variations and Edge Cases

Tighter runner controls often increase pipeline friction, requiring organisations to balance release speed against credential containment. That tradeoff is especially visible in high-churn engineering environments, monorepos, and self-hosted runner fleets where teams want low-latency builds and wide tool access.

One common edge case is long-running jobs that genuinely need access across multiple stages. Current guidance suggests splitting those workflows into smaller tasks with separate credentials rather than extending token lifetime. Another is third-party actions or plugins, which can inherit runner context in ways that are difficult to inspect. In those cases, the safer default is to assume the tool chain may be part of the trust boundary and to minimise every secret it can see. The 52 NHI Breaches Analysis and Ultimate Guide to NHIs both reinforce that excessive privilege and poor rotation are recurring failure patterns.

There is no universal standard for runner identity design yet, but best practice is evolving toward workload identity, JIT secrets, and hard revocation boundaries. That approach is strongest in cloud-native CI, and weakest when legacy scripts expect static credentials to persist across manual retries, reruns, and cross-account deployments.

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 CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-03 Runner secrets often outlive the job, creating rotation and reuse risk.
OWASP Agentic AI Top 10 A2 CI runners behave as autonomous workloads with tool access and execution authority.
CSA MAESTRO IAM-02 MAESTRO addresses identity and access control for automated agentic and pipeline workloads.
NIST AI RMF GOVERN AI RMF governance applies where CI runners support autonomous or AI-driven workflows.
NIST CSF 2.0 PR.AC-4 Least-privilege access is central to reducing blast radius for compromised runners.

Assign ownership, logging, and accountability for every automated runner identity and its credentials.