Security in CI/CD Pipelines
Overview
The CI/CD Attack Surface
Developer CI Pipeline Registry Production
β β β β
ββββ push βββΆ β β β
β [build + test] β β
β [image scan] β β
β [sign artifact] ββpushβββΆ β β
β [verify sig] ββdeployβββΆβ
Attack vectors:
β Code injection β Dependency confusion β Image tampering
β Secrets theft β Malicious dependencies β Registry hijackSecrets Management in Pipelines
Never Store Secrets as Plain Text
OIDC for Cloud Authentication
Container Image Scanning
Trivy in CI
Scanning at Multiple Stages
Stage
What
Tool
Software Bill of Materials (SBOM)
Image Signing and Verification (Cosign / Sigstore)
Signing in CI
Keyless Signing with OIDC
Verifying Signatures with Kyverno
SLSA Framework
Level
Requirements
Protection
Dependency Security
Pinning Dependencies
Dependency Confusion Attacks
Pipeline Security Best Practices
Practice
Description
Key Takeaways
Further Reading
Last updated