Interview Prep/DevOps Fundamentals/Security basics for DevOps

What is software supply chain security (SBOM, image signing, SLSA)?

IntermediateConceptSecurity basics for DevOps
Answer

In one line: Software supply chain security protects everything that goes into building and shipping your software — dependencies, build systems, pipelines and artifacts — so attackers can't slip malicious code in along the way.

Why it became important: major attacks targeted the supply chain rather than the app itself — SolarWinds (a compromised build system), Codecov (a tampered CI script), malicious npm/PyPI packages, and the xz-utils backdoor.

Key practices:

  1. SBOM (Software Bill of Materials)

    • A list of every component and version in your software, like an ingredients label.
    • Formats: SPDX, CycloneDX. Tools: Syft, Trivy, Docker BuildKit.
    • When a new CVE appears, you can instantly find which images contain the affected library.
    syft orders:1.4.2 -o cyclonedx-json > sbom.json
    
  2. Artifact signing

    • Sign images so you can prove who built them and that they haven't been changed.
    • Sigstore Cosign (often keyless, using the CI's OIDC identity).
    cosign sign myrepo/orders@sha256:9f...
    cosign verify myrepo/orders@sha256:9f... --certificate-identity-regexp ... --certificate-oidc-issuer ...
    
    • Kubernetes admission policies (Kyverno, Sigstore policy-controller) only allow signed images.
  3. Provenance and SLSA

    • SLSA (Supply-chain Levels for Software Artifacts) is a framework with levels that describe how trustworthy a build is: scripted builds, signed provenance, hardened isolated build platforms.
    • Provenance records how, where and from what source an artifact was built.
  4. Dependency hygiene

    • Pin versions and use lock files; verify checksums.
    • Use a private proxy registry (Nexus/Artifactory) and watch for typosquatting packages.
    • Automated updates with review (Dependabot/Renovate).
  5. Secure the pipeline itself

    • Least-privilege CI tokens, OIDC instead of static keys, pin third-party GitHub Actions to a commit SHA, protect pipeline files with CODEOWNERS, use ephemeral runners.

Tip for interviews: explain SBOM, signing and pinning with one tool each — that's enough to stand out.

All DevOps Fundamentals questions

More on Security basics for DevOps