How would you build an end-to-end secure pipeline for a container service?
AdvancedProductionSupply Chain and Pipeline Security
Answer
- PR: secret scan, SAST (CodeQL/Semgrep), SCA, IaC scan, lint, tests; actions pinned; read-only token.
- Build on an ephemeral, isolated runner from a pinned builder image; reproducible-friendly Dockerfile; digest-pinned base.
- Scan the image; fail on fixable criticals/highs.
- Generate SBOM; sign image by digest (cosign keyless); attach provenance and SBOM attestations.
- Push to the registry with immutable tags.
- Deploy via GitOps; admission policy verifies signature, issuer identity and provenance.
- Runtime: least-privilege service account, read-only root FS, network policies, runtime detection (Falco).
- Continuous rescan of deployed images; SBOM store for impact analysis.
flowchart LR
A["Commit"] --> B["Secret scan, SAST, SCA"]
B --> C["Build on ephemeral runner"]
C --> D["Image scan + SBOM"]
D --> E["Sign + attest provenance"]
E --> F["Push immutable tag"]
F --> G["GitOps deploy"]
G --> H["Admission verifies signature"]
More on Supply Chain and Pipeline Security
What is a software supply chain attack, and where does the pipeline fit?BeginnerWhat is an SBOM and why do you generate one in CI?BeginnerHow do you sign container images and verify them at deploy time?IntermediateWhat is SLSA and which level should a typical team aim for?IntermediateHow do you verify provenance before deploying?AdvancedHow do you scan images and dependencies in the pipeline without drowning in noise?Intermediate