Join our Newsletter — 33% off our NHI Course
Home FAQ Cyber Security What happens when a CI/CD pipeline is poisoned…
Cyber Security

What happens when a CI/CD pipeline is poisoned or a build agent is compromised?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 20, 2026 Domain: Cyber Security

A poisoned pipeline can turn trusted automation into a delivery path for malicious code, altered configurations, or unauthorized releases. If a build agent is also overprivileged, the attacker may move from the pipeline into connected systems and sensitive resources. Code signing, review of critical changes, and restricted access help contain that scenario before it spreads.

How a Poisoned Pipeline Becomes a Trusted Delivery Channel

A CI/CD pipeline is valuable to attackers because it is already trusted to build, test, package, and deploy software. If that trust is poisoned, the malicious change can move through normal release paths, making the attacker’s code look operationally legitimate. That shifts the problem from a single compromised system to a compromised delivery process.

The most common failure mode is substitution: source, build scripts, dependencies, environment variables, or artifacts are altered so the pipeline emits something different from what developers intended. A build agent compromise is more dangerous when the agent can reach signing keys, package registries, production credentials, or deployment targets, because the attacker can turn build-time access into broader execution control.

Supply-chain integrity controls matter here because they make the pipeline’s outputs harder to forge and easier to verify. Provenance checks, separation of duties, and restriction of build-time permissions reduce the chance that one compromised stage can silently rewrite the release stream. For teams operating at scale, SLSA is the clearest external model for raising build integrity and provenance expectations.

What Compromise Looks Like in Practice

Once an attacker has control of a build agent or a pipeline step, they can target the artifacts downstream users trust most: compiled binaries, containers, release bundles, deployment manifests, and configuration. In practice that can mean shipping malicious code, inserting a backdoor, changing infrastructure settings, or replacing a legitimate dependency with a tampered one.

Build systems also concentrate useful secrets. If the pipeline stores signing material, cloud credentials, API tokens, or deployment passwords, compromise can expose them directly or through logs and generated files. NHIMG research indicates that 96% of organisations store secrets outside of secrets managers in vulnerable locations, including code, config files, and CI/CD tools. That makes the pipeline not just an execution path, but a common secret-exposure path too.

For readers looking at real-world attack patterns, Reviewdog GitHub Action supply chain attack shows how a trusted automation component can be abused, and CI/CD pipeline exploitation case study illustrates how pipeline misconfiguration can become a broader compromise route.

Risk and Threat Considerations

Poisoned pipelines are high-impact because they collapse the boundary between development activity and production trust. The attacker is not only stealing access, they are using the release process itself as an infection vector, which can scale compromise across every system that consumes the pipeline’s outputs.

Failure mechanism: A build agent, dependency, secret, or signing path is compromised, then used to modify artifacts, inject unauthorized code, or reuse privileged pipeline access against connected systems and environments.

Impact: The result can include malicious releases, credential theft, unauthorized deployment, lateral movement into adjacent systems, and a lasting integrity problem that is difficult to detect after distribution.

At scale, the risk is amplified by long-lived secrets, shared runners, overly broad environment access, and weak artifact verification. If a compromised pipeline can also write to registries, deployment systems, or infrastructure-as-code repositories, the attacker can persist across multiple release cycles instead of triggering a single obvious event.

Standards & Framework Alignment

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

MITRE ATT&CK and OWASP Non-Human Identity Top 10 address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS 6 — Access Control ManagementBuild agents and pipeline steps need tightly scoped access to reduce abuse of privileged delivery paths.
CIS 8 — Audit Log ManagementPipeline compromise is often detected through unexpected job execution, artifact changes, or secret use.
CIS 16 — Application Software SecurityPoisoned build outputs are a software supply-chain integrity problem that must be controlled in delivery.
Recommendation — Restrict pipeline and build-agent access to the minimum permissions needed for each job. Log pipeline actions, artifact changes, and privileged release events for review and detection. Verify build integrity and protect release artifacts before they are published or deployed.
NIST CSF 2.0PR.AC — Access ControlCompromised build agents become dangerous when pipeline access is broader than the job requires.
PR.DS — Data SecurityCI/CD poisoning often targets secrets, signing material, and release artifacts that need protection.
DE.CM — Continuous MonitoringSuspicious pipeline activity and unexpected artifact changes require monitoring to detect compromise quickly.
Recommendation — Constrain pipeline privileges so compromised build steps cannot reach unrelated systems or secrets. Protect pipeline data, secrets, and artifacts with controls that preserve integrity and confidentiality. Monitor build and release activity for unexpected changes, privilege use, and artifact deviation.
MITRE ATT&CKT1195 — Supply Chain CompromiseA poisoned CI/CD pipeline is a classic supply-chain compromise path for delivering malicious code.
T1552 — Unsecured CredentialsCompromised build agents often expose credentials, tokens, or signing material stored in the pipeline.
T1105 — Ingress Tool TransferAttackers may use the build path to move payloads and tools into trusted environments.
Recommendation — Model pipeline poisoning as supply-chain compromise and hunt for tampered artifacts or injected steps. Harden pipelines against credential exposure and rotate any secrets reachable from build jobs. Inspect pipeline-delivered files and transfers for unexpected payloads or staging behavior.
OWASP Non-Human Identity Top 10NHI-01 — Secrets and Credential ManagementCI/CD compromise often exploits exposed secrets, tokens, and signing material in delivery tooling.
Recommendation — Move pipeline secrets into managed storage and remove long-lived credentials from build environments.

Practitioner Guidance

What to verify: Confirm that the build agent cannot reach higher-trust systems than the job requires, and that signing material, release credentials, and deployment tokens are isolated from routine build steps. Treat any pipeline step that can change production state as a privileged control point, not as a normal developer convenience.

What to prioritize: Focus first on artifact integrity, secret containment, and approval boundaries for critical changes. If a pipeline can produce signed or deployable output, the review standard should be stricter than ordinary code review because the blast radius is much larger than a single repository.

Practitioner takeaway: A compromised CI/CD pipeline is dangerous because it turns trust into distribution power, so the real control objective is not just detection after the fact, but limiting what the pipeline can sign, read, and deploy in the first place.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

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