Cookies Notice
This site uses cookies to deliver services and to analyze traffic.
📣 Introducing AI Threat Modeling: Preventing Risks Before Code Exists
CI/CD security is the practice of protecting continuous integration and continuous delivery pipelines from threats that can compromise the software build, test, and deployment process. CI/CD pipelines automate how code moves from a developer’s commit to production, making them critical infrastructure. A compromised pipeline can inject malicious code into every artifact it produces, affecting every downstream environment and customer.
As organizations ship faster and rely on automation to scale, CI/CD pipeline security has become a primary concern for security and platform engineering teams. Attackers increasingly target pipelines because a single point of compromise can cascade across an entire software portfolio.
CI/CD pipelines connect source code repositories, build systems, artifact registries, testing frameworks, and deployment targets. Each connection point introduces potential attack surface. The most common risks include:
Understanding these risks is the first step toward building pipelines that are resilient to both external attackers and insider threats.
Effective CI/CD security applies controls at every stage of the pipeline. The table below maps key controls to the pipeline phase where they have the most impact:
| Pipeline Phase | Security Controls |
| Source | Branch protection rules, signed commits, code review requirements, access controls on pipeline config files |
| Build | Pinned and verified dependencies, isolated build environments, CI/CD vulnerability scanning for code and containers, minimal build agent permissions |
| Test | SAST, SCA, and secret scanning integrated as pipeline gates, fail-fast policies on critical findings |
| Artifact | Artifact signing, provenance metadata (e.g., SLSA attestations), immutable artifact storage |
| Deploy | Environment-specific approval gates, infrastructure-as-code scanning, runtime policy enforcement, software deployment security controls |
| Post-deploy | Drift detection, runtime monitoring, audit logging of deployment events |
Beyond stage-specific controls, several cross-cutting practices strengthen the entire pipeline, including:
Organizations looking to deepen their pipeline protections should consider CI/CD pipeline security best practices that cover both preventive and detective controls. Mature teams also integrate build pipeline security assessments into their regular security review cadence to catch configuration drift and new risks as pipelines evolve.
Traditional AST focuses on vulnerabilities in application code. CI/CD security protects the infrastructure and automation that builds, tests, and deploys that code, covering pipeline configs, secrets, and access controls.
Poisoned pipeline execution, compromised dependencies, stolen secrets, and abuse of overly permissive service accounts are the most frequent attack paths targeting CI/CD environments.
Source stage: secret scanning and commit signing. Build stage: dependency verification and container scanning. Test stage: SAST and SCA. Deploy stage: artifact signature verification and policy checks.
Use a centralized secrets manager with short-lived, auto-rotating credentials. Avoid hardcoding secrets in pipeline files. Scope access per pipeline stage and audit all secret retrievals.
Track pipeline policy compliance rate, mean time to remediate pipeline vulnerabilities, percentage of signed artifacts, secret rotation frequency, and audit coverage across pipeline stages.
Recognized by leading analysts
Apiiro is named a leader in ASPM by IDC, Gartner, and Frost & Sullivan. See what sets us apart in action.