Subscribe to the Non-Human & AI Identity Journal
Home FAQ Threats, Abuse & Incident Response Why do exposed secrets in CI/CD pipelines create…
Threats, Abuse & Incident Response

Why do exposed secrets in CI/CD pipelines create such a large blast radius?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated August 1, 2026 Domain: Threats, Abuse & Incident Response

CI/CD systems often hold cloud credentials, deployment tokens, and repository access in the same execution context. When malicious code runs there, it can collect secrets from environment variables, files, and process memory, then reuse them across cloud and source control. The more privileged the runner, the larger the downstream impact.

Why This Matters for Security Teams

Exposed pipeline secrets are not just a credential hygiene issue. A CI/CD runner often sits at the junction of source control, artifact stores, cloud APIs, and deployment automation, so one leaked token can become a bridge into multiple trust zones. That makes the blast radius far larger than a single application or repo. NHI Management Group has documented how pipeline compromise can turn routine automation into a fleet-wide access event in its CI/CD pipeline exploitation case study.

The real risk comes from privilege concentration and reuse. A runner that can read secrets from environment variables, files, or memory can often also deploy code, pull container images, and call cloud control planes. If those secrets are long-lived, static, or shared across environments, the attacker inherits the same reach. The OWASP Non-Human Identity Top 10 treats this as an identity problem, not just a scanning problem, because the exposed secret is usually a workload credential with real authority. In practice, many security teams discover the impact only after the runner has already touched production, not when the secret first appears in a log or build step.

How It Works in Practice

CI/CD pipelines amplify exposure because they aggregate trust. A build job may inherit repository permissions, registry credentials, cloud service access, and signing keys in one execution context. Once malicious code runs in that context, it can enumerate environment variables, scrape mounted files, inspect process memory, and exfiltrate any secret that is reachable from the job. That is why secret scanning alone is insufficient if the pipeline itself can execute untrusted code.

The practical control model is to reduce standing access and make credentials task-bound. Current guidance suggests using short-lived tokens, isolated runners, and workload identity instead of embedding long-lived static secrets. For example, OIDC-based federation can replace stored cloud keys, while policy engines can decide at request time whether a job may assume a role. That aligns with the NHI Management Group guidance in the Ultimate Guide to NHIs - Static vs Dynamic Secrets, which emphasizes that secret lifetime should match task lifetime, not pipeline lifetime.

  • Use ephemeral credentials with automatic revocation after each job or deployment.
  • Separate build, test, and release identities so compromise in one stage cannot reach all stages.
  • Prefer workload identity and federation over stored API keys wherever the platform supports it.
  • Restrict runner egress and tool access so a compromised job cannot freely pivot across cloud and source control.

GitGuardian’s The State of Secrets Sprawl 2026 reports that 59% of compromised machines in a major 2025 supply chain attack were CI/CD runners rather than personal workstations, which is a strong signal that attackers target the automation tier because it concentrates reusable access. These controls tend to break down when self-hosted runners share the same network and privilege boundary as production systems.

Common Variations and Edge Cases

Tighter pipeline controls often increase release friction, so organisations have to balance deployment speed against blast-radius reduction. That tradeoff is especially visible in legacy environments, where monolithic runners, shared service accounts, and manual approval steps make it difficult to isolate privileges without slowing delivery.

There is no universal standard for this yet, but current best practice is evolving toward segmented identities, per-environment secrets, and runtime policy checks instead of broad pre-issued access. Public cloud workloads are usually easier to modernise than on-prem or hybrid pipelines, where older tooling may not support OIDC federation or fine-grained job scoping. In those cases, compensating controls such as vault-backed secret brokering, short TTLs, and network segmentation matter more.

This risk also extends beyond code. Secret material can enter pipelines through copied config files, dependency hooks, build scripts, or CI variables synced from collaboration tools. NHI Management Group’s Guide to the Secret Sprawl Challenge is useful here because the same credential can spread across repos, tickets, and pipeline definitions before anyone notices. The key edge case is highly privileged release automation: when the pipeline can both mint and deploy secrets, a single compromise can become an organisation-wide access event.

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-03Targets secret sprawl and improper credential handling in non-human identities.
OWASP Agentic AI Top 10Covers autonomous execution paths that can misuse pipeline-held secrets.
CSA MAESTROAddresses identity, trust, and policy controls for automated cloud workflows.
NIST AI RMFGOVERNRequires governance over automated systems that can affect security outcomes.
NIST Zero Trust (SP 800-207)AC-4Supports runtime enforcement and segmentation to limit lateral movement.

Map pipeline identities, isolate stages, and enforce least privilege at each automation hop.

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