How do you secure the software supply chain from commit to production?
AdvancedScenarioPipelines at scale
Answer
Situation read → Attackers now target the pipeline itself: dependencies, actions, runners and credentials. You need integrity at every hop, and proof of it.
What I'd do →
- Source: branch protection, required reviews, signed commits for sensitive repos, CODEOWNERS on pipeline files.
- Dependencies: lockfiles, Renovate updates, SCA scanning, and a private proxy (Artifactory, CodeArtifact) so builds don't pull straight from the internet.
- Build: ephemeral runners, actions pinned to SHAs, minimal
permissions:, OIDC instead of stored cloud keys. - Artifact: generate an SBOM and SLSA provenance, sign with Cosign.
permissions:
contents: read
id-token: write
attestations: write
steps:
- uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.ECR }}/api
subject-digest: ${{ steps.build.outputs.digest }}
- Deploy: admission control verifies the signature and provenance; deploy by digest.
- Run: runtime detection and continuous image rescanning.
Why → Each control covers a different attack; provenance links the running image back to a reviewed commit.
Interview tip → Reference SLSA levels and say which level you've reached; honesty about maturity scores well.
More on Pipelines at scale
The CI pipeline takes 45 minutes. Developers want it under 10. How do you approach it?IntermediateYou have a monorepo with 40 services. Every commit builds and tests all of them. How do you fix that?AdvancedFlaky tests fail 1 in 5 runs and developers just click "re-run". How do you fix this culture and the tests?BeginnerYour self-hosted GitHub runners can't keep up at peak and sit idle at night. How do you run them at scale?AdvancedDocker builds in CI take 12 minutes because every runner starts with an empty cache. How do you speed them up?IntermediateFifty teams have copy-pasted pipelines that have drifted apart. How do you standardise them?Intermediate