What Is CI/CD Pipeline Security?
CI/CD pipeline security is the practice of protecting the systems that build, test and deploy software, including workflow definitions, runners, credentials, dependencies and build artifacts. Because pipelines hold production access and secrets, a compromised pipeline can let an attacker ship malicious code through a trusted release process.
Also known as:
What CI/CD Pipeline Security Covers
A CI/CD pipeline turns a code change into a running release. Securing it means controlling who and what can change the pipeline, what code it runs, which credentials it can use and whether its output can be trusted. NIST SP 800-204D treats these pipelines as a core place to apply software supply chain security in DevSecOps.
Why Attackers Target Pipelines
Pipelines combine three things attackers want: they execute code automatically, they hold secrets such as cloud and registry credentials, and their output is trusted downstream. Compromising one workflow can expose those credentials or place malicious code in a signed, official release, which makes pipelines a common route into a supply chain attack.
Common CI/CD Security Risks
The OWASP Top 10 CI/CD Security Risks is the main public taxonomy. Several of its risks show up repeatedly in real workflows:
- Poisoned pipeline execution (CICD-SEC-4). An attacker changes what a pipeline runs, for example through a malicious pull request or injected script.
- Inadequate identity and access management (CICD-SEC-2). Too many people or services can change pipelines or reach what they deploy.
- Dependency chain abuse (CICD-SEC-3). Builds pull in malicious or hijacked packages and actions.
- Insufficient credential hygiene (CICD-SEC-6). Long-lived or overly broad secrets are exposed in logs, artifacts or jobs.
- Improper artifact integrity validation (CICD-SEC-9). Nothing proves a release came from the expected source and build.
A Risky Workflow Example
In GitHub Actions, the pull_request_target trigger runs in the context of the base repository. If that workflow checks out and runs code from an untrusted pull request, the contributor's code can gain access it should never have. GitHub's guidance is direct: workflows using this trigger must not check out untrusted code.
How to Secure a CI/CD Pipeline
- Pin third-party actions to a full-length commit SHA instead of a mutable tag.
- Set the default
GITHUB_TOKENto read-only and grant extra permissions per job. - Use OpenID Connect for cloud access instead of storing long-lived credentials as secrets.
- Pass untrusted values through environment variables rather than expanding them directly in inline scripts.
- Require review for workflow changes, and avoid self-hosted runners on public repositories.
- Generate build attestations so consumers can verify where an artifact came from.
How Nullify Checks CI/CD Posture
Nullify Supply Chain Posture Management reads CI/CD definitions in each repository and checks GitHub Actions, GitLab CI and Azure Pipelines for unpinned actions, script and YAML injection, over-provisioned permissions, dangerous triggers, cache poisoning, OIDC over-scoping and missing build attestation. It scans the default branch and pull requests, triages findings and can draft a pull request for fixes that map cleanly to a manifest edit, such as pinning an action. See recent AppSec incidents or explore Triage & Remediation.
Key Takeaways
- CI/CD pipeline security protects the systems that build, test and deploy software.
- Pipelines are valuable targets because they run code, hold secrets and produce trusted releases.
- The OWASP Top 10 CI/CD Security Risks is the main public taxonomy.
- Pinned actions, least-privilege tokens, OIDC and safe triggers remove many common risks.
Read More About CI/CD Pipeline Security
AppSec Incident Watch
See Nullify in Action
See how real pipeline and supply chain compromises unfolded in recent AppSec incidents.