Join our Newsletter — 33% off our NHI Course
Home› Glossary› NHI Lifecycle Management› Pipeline Definition
NHI Lifecycle Management

Pipeline Definition

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: NHI Lifecycle Management

A Pipeline Definition is the configuration file, often YAML, that sets the triggers, stages, steps and variables of a CI/CD pipeline. Attackers who can edit it can run their own commands, read pipeline secrets or push malicious builds. Defenders protect it with code review, branch protection, restricted edit rights and least-privilege pipeline credentials.

What the pipeline definition does

A pipeline definition is the source of truth for how a CI/CD pipeline behaves. It defines when the pipeline runs, which stages execute, what variables are available, and how build, test and deploy steps are chained together. Because the file controls automation, small changes can materially alter what code is built, what environments are touched and what credentials the pipeline can reach.

That makes the file more than configuration. It is an execution policy for delivery automation, so its security posture affects both software integrity and the trust boundary around the pipeline itself.

Why pipeline definitions are security-sensitive

Attackers who can edit a pipeline definition can often turn trusted automation into an execution path. They may inject commands, exfiltrate secrets, tamper with build artefacts or publish code that bypasses normal review. This is why pipeline definitions should be treated as protected code, not as an operational convenience.

The strongest protection comes from constraining who can modify the file and how changes are approved. Branch protection, mandatory review and tightly scoped edit permissions reduce the chance that a malicious or careless change reaches the main pipeline path. Where a pipeline can access deployment keys or other secret material, the risk rises sharply because the definition can become a shortcut to higher-trust systems.

How organisations control exposure

Exposure starts with knowing which repositories, branches and pipeline configurations are live, who can edit them and which pipelines still rely on broad credentials. A pipeline definition is only as safe as the surrounding repository controls, so teams should examine change history, protected branches and approval rules together rather than in isolation. The DevOps vs DevSecOps guide is useful here because it shows how pipeline ownership, security gates and identity boundaries change when security becomes part of delivery design.

Practically, organisations should assume that pipeline-definition exposure is a configuration and privilege problem as much as a code problem. If the pipeline can read secrets, call cloud services or deploy to production, the definition itself becomes a control surface that deserves the same scrutiny as application code and infrastructure-as-code.

Secure change handling and verification

Defending the file means validating the change path, not just the syntax. Reviewers should look for hidden execution steps, new script blocks, altered variable references and changes that expand runtime permissions. Build systems should also be checked for whether the pipeline definition is stored, reviewed and promoted in a way that preserves provenance from commit to build output.

Where organisations want a deeper operational baseline, a regular health check can help verify credential hygiene, build-agent trust, logging and pipeline-change review. The CI/CD server health check is a useful companion because it focuses on the surrounding controls that make pipeline changes safe to execute. For build integrity and provenance, teams should also align pipeline controls with SLSA so that the pipeline definition is managed as part of an auditable software supply chain.

Detection and recovery after compromise

If a pipeline definition has been altered maliciously, the immediate concern is not only the file itself but everything it may have touched, including secrets, build outputs and downstream environments. Detection should focus on unusual pipeline edits, unexpected commands in build logs, unexplained secret access and artefacts that differ from trusted build provenance. A compromised pipeline definition can persist quietly if the malicious change still produces apparently valid builds.

Recovery should include reviewing recent pipeline runs, invalidating any credentials the pipeline could reach and checking whether the malicious definition caused lateral damage through artefact repositories or deployment targets. The reviewdog Action compromise 2025 case study is a reminder that supply-chain abuse in CI/CD often starts with trusted automation and ends with secret exposure. The CI/CD pipeline exploitation case study shows the same general pattern from the pipeline-definition side, where a config change enabled unauthorised execution on the server.

Standards & Framework Alignment

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

CIS Controls v8, NIST SP 800-53 Rev 5, OWASP ASVS and SLSA set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-5 — Account ManagementPipeline definitions depend on tightly controlled edit rights and privileged access.
Recommendation — Restrict who can edit pipeline definitions and review privileged pipeline accounts regularly.
NIST SP 800-53 Rev 5CM-3 — Configuration Change ControlThe term is fundamentally about controlled changes to a pipeline configuration file.
AC-6 — Least PrivilegePipeline definitions often govern permissions that should be minimized to reduce abuse.
Recommendation — Apply formal change control to pipeline-definition edits before they reach execution. Limit pipeline edit and runtime privileges to the minimum needed for delivery.
OWASP ASVSV15 — Secure Coding and ArchitecturePipeline definitions are code-like automation artefacts whose changes can alter system behaviour.
Recommendation — Review pipeline-definition logic with the same discipline used for security-critical code.
SLSASupply-chain Levels for Software ArtifactsPipeline definitions affect build provenance and integrity across the delivery chain.
Recommendation — Use SLSA-aligned controls to preserve provenance from pipeline change to released artefact.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

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