Treat CI/CD security as a continuous control problem. The practical shift is from isolated testing to pipeline-embedded checks that run at commit, build, test, and deploy. That lets teams catch vulnerable code, misconfigurations, and dependency drift before release, instead of discovering them after the software has already crossed the trust boundary.
Why CI/CD Security Breaks When It Is Treated as a Scan
The failure mode is usually a timing problem, not a tooling problem. A single pre-release scan can find known issues, but it cannot stop a bad commit, a poisoned dependency, or a leaked token from becoming part of the pipeline’s trusted path. Teams need controls that watch the pipeline as code moves through it, because the trust boundary shifts at every stage.
A useful mental model is that CI/CD is closer to pipeline identity security than to a one-off quality gate. The practical question is not whether a scan ran, but whether the pipeline had the right authority, the right inputs, and the right checks at the moment each action occurred.
That is why controls at commit, build, test, and deploy matter differently. Commit-stage checks can catch risky changes early, build-stage controls can validate provenance and dependencies, test-stage controls can detect unexpected behaviour, and deploy-stage controls can prevent unsafe release of an artifact that no longer matches what was reviewed.
Where Continuous CI/CD Controls Need to Intercept Failure
CI/CD security fails when teams assume the same check covers every stage equally. In practice, code quality, dependency integrity, secret handling, and deployment approval each fail in different ways, so a mature pipeline needs stage-specific controls rather than one broad scan.
This is also where supply-chain abuse becomes more realistic. A malicious package, a compromised action, or a leaked credential can alter what the pipeline builds long before a final scan notices anything. reviewdog Action compromise 2025 is a reminder that pipeline trust often breaks through the tooling around code review, not just through the source repository itself.
Teams should also expect configuration drift. A pipeline that was safe last month may become unsafe after a dependency update, a permissions change, or a new integration. That is why the security model has to include the pipeline definition, the runners, the tokens, the build outputs, and the deployment path, not only the application code.
Build provenance is a key control point here. If teams cannot establish what was built, from what source, and under what permissions, they cannot reliably treat the artifact as trustworthy at release time. For that reason, provenance checks and signed outputs belong in the same conversation as scanning.
What a Continuous Control Model Looks Like in Practice
The operational shift is to embed checks where decisions are made, not only where review is convenient. At commit time, teams can block obvious policy violations and secret leaks. During build, they can verify dependency integrity, pinned actions, and artifact provenance. During test, they can look for unexpected execution paths or configuration regressions. During deploy, they can enforce approval, environment separation, and release attestation.
That pattern aligns well with the broader supply-chain discipline in SLSA, because the point is to make build inputs and build outputs more trustworthy over time. A pipeline that produces reproducible, traceable artifacts is much easier to defend than one that only gets a security verdict at the end.
It also changes ownership. Security cannot be a late-stage gate that owns everything after engineering has finished. Engineering owns the pipeline logic, platform teams own the runtime controls, and security owns the policy, detection, and exception standards that keep the whole chain coherent.
One practical indicator is whether the team can answer basic release questions quickly: what changed, who approved it, which secrets were available, which dependencies were introduced, and whether the artifact deployed is the same artifact that passed review. If that evidence is hard to produce, the control model is still too scan-centric.
Risk and Threat Considerations
When CI/CD is treated as a one-time scan problem, the main risk is that compromise happens after the scan but before release. Attackers target that gap because the pipeline often has broad access, trusted credentials, and automation that will faithfully execute poisoned inputs once they are present.
Failure mechanism: A malicious commit, dependency update, action, or leaked token changes the pipeline’s behaviour after the last point-in-time check, allowing secret theft, tampered builds, or unsafe deployment without a new security decision.
Impact: The organisation can ship compromised artifacts, expose credentials, or create a persistent supply-chain foothold that spreads across many repositories and environments before anyone notices.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
SLSA and NIST SP 800-53 Rev 5 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| SLSA | Supply-chain Levels for Software Artifacts | CI/CD trust depends on build provenance and artifact integrity. |
| Recommendation — Adopt SLSA-aligned provenance and attestation checks for every release artifact. | ||
| NIST SP 800-53 Rev 5 | SA-10 — Developer Configuration Management | Pipeline-defined controls must govern code, build inputs, and release changes. |
| SI-7 — Software, Firmware, and Information Integrity | Continuous CI/CD checks need integrity controls for code, dependencies, and artifacts. | |
| IA-5 — Authenticator Management | CI/CD security depends on rotating and governing tokens, keys, and other secrets. | |
| Recommendation — Apply SA-10 discipline to control and review pipeline and build changes. Use SI-7 controls to verify integrity at commit, build, and release stages. Manage pipeline secrets with IA-5 rotation, expiration, and revocation discipline. | ||
| ISO/IEC 27001:2022 | A.8.9 — Configuration management | CI/CD pipelines are configured systems whose security depends on controlled change. |
| Recommendation — Control pipeline configuration changes and baseline trusted build settings. | ||
Practitioner Guidance
What to prioritise: Start by mapping the controls to the exact pipeline stages where trust changes, then decide which checks must block execution versus merely alert. If the pipeline can still reach production with unverified inputs or broad credentials, the control model is incomplete.
What to verify: Confirm that secrets are short-lived, build identities are least-privilege, actions and dependencies are pinned or verified, and deployment artifacts are attested. The control is only meaningful if the release path can prove the artifact that was tested is the artifact that ships.
Practitioner takeaway: Treat CI/CD security as a runtime governance problem over build authority and artifact trust, not as a report generated after the fact.
Related resources from NHI Mgmt Group
- How should security teams stop malicious CI/CD workflow commits from executing?
- How should security teams prevent CI/CD pipelines from treating build failures as successful releases?
- How should security teams scan obfuscated JavaScript in CI/CD pipelines without blocking legitimate releases?
- How should security teams implement CI/CD security gates so they stop risky code before deployment?
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on October 12, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org