SecPrep logoSecPrep

What controls secure a CI/CD pipeline against supply-chain attacks?

The CI/CD pipeline has the same (or higher) privileges as production: it can build, sign, and deploy software. A compromised pipeline is as bad as a compromised production server.

Key controls: Pin and verify dependencies — use lock files and SCA (Software Composition Analysis) tools to catch known-vulnerable or malicious packages; pin third-party CI actions to a specific SHA (not a mutable tag). Use short-lived credentials — federate to the cloud using OIDC (e.g. GitHub Actions → AWS via OIDC) so the pipeline never holds long-lived access keys. Protect the pipeline config itself — branch-protect .github/workflows or equivalent and require code review, since a pipeline config change is code execution. Sign artifacts and verify provenance — use Sigstore/cosign and SLSA (Supply-chain Levels for Software Artifacts) to prove an artifact was built from a specific commit and was not tampered with. Produce and consume SBOMs (Software Bills of Materials) so you know exactly what's shipping.

The SolarWinds (2020) and Codecov (2021) incidents both stemmed from attackers compromising the build system itself, which then silently backdoored every artifact.

Practice this in the app →