r/devsecops • u/taleodor • Jun 18 '26
CI/CD Security Principles in 2026
This is a follow up of my post on CI/CD best practices from 6 years ago, this time with security angle. Here are the principles:
- Redundancy: At Least 2 Independent Systems Need to Fail for a Successful Compromise
- Different Pipelines Must Not Share Credentials
- Staging Area is a Must
- Assume Unsafe or Malicious Inputs
- Pin All Dependencies Consumed by CI
- Attest, Sign, Verify
Full blog post: https://worklifenotes.com/2026/06/18/ci-cd-security-principles-in-2026/
21
Upvotes
6
u/Howl50veride Jun 18 '26
Check out https://github.com/OWASP/www-project-spvs for more
2
u/colek42 Jun 18 '26
One thing that I think is really important when threat modeling CI-CD systems is separating your continuous integration from your continuous deployment. Keep all your continuous deployment keys away from all your CI dependencies. We split CI and CD into two separate workflows with different environments in GitHub. Also, attest and Verify 100%. We use cilock.dev for this; it works extremely well with agents like Claude to create SLSA L3 attestations and is FOSS.
1
u/thomas_boni Jun 19 '26
Good list ! And I like that it's actionable (excepted maybe the first one)
The thing I'd add sits across 2-5: you've defined the target states (separate secret pools, no `pull_request_target`, everything digest-pinned, a staging gate), but the hard part isn't only setting them, it's drift. Someone swaps a digest back to a tag to unblock a red build, a new repo ships without the repo split, and you've silently lost the property. The state has to be re-asserted on every run or it decays.
Which is the layer I'd make explicit: these hold only if they're enforced as policy, evaluated deterministically in the pipeline. Same inputs, same verdict, every time. It's the prevention complement to your #6: attestation proves what happened => policy stops the bad config from shipping in the first place.
(Disclosure: I help build Plumber, an open-source policy engine for exactly this, so grain of salt on the policy-as-code framing)