Supply Chain Security
Software Supply Chain Security
Software Supply Chain Security
Software supply chain security (Supply Chain Security) is a security domain that prevents malicious code injection, dependency threats, and build system compromise across the entire process from software development to deployment. The SolarWinds (2020), Log4j (2021), and XZ Utils (2024) incidents highlighted its importance.
Supply chain attack vectors are diverse. They include dependency confusion, typosquatting, malicious maintainers, build server compromise, and theft of code signing keys. The compromise of a single library affects thousands of projects.
The defense strategy is multi-layered. It combines SBOM for component visibility, SLSA for build provenance verification, Sigstore for signature verification, Dependabot for managing vulnerable dependencies, and private registries for controlling dependencies.
On the regulatory side, the U.S. Executive Order 14028 and the EU Cyber Resilience Act mandate SBOM submission and supply chain security. Companies must respond to compliance requirements.
# μννΈμ¨μ΄ 곡κΈλ§ 보μ 체ν¬λ¦¬μ€νΈ ꡬν
# 1. SBOM μμ± (Syft)
syft packages ghcr.io/myorg/myapp:latest -o spdx-json > sbom.json
# 2. μ·¨μ½μ μ€μΊ (Grype)
grype sbom:sbom.json --output json > vulnerabilities.json
# 3. μμ‘΄μ± μ κΈ (package-lock.json, go.sum λ±)
npm ci --ignore-scripts # μ€ν¬λ¦½νΈ μ€ν μμ΄ μ νν λ²μ μ€μΉ
# 4. λΉκ³΅κ° λ μ§μ€νΈλ¦¬ μ€μ (.npmrc)
registry=https://registry.myorg.com/
@myorg:registry=https://registry.myorg.com/
# 5. 컨ν
μ΄λ μ΄λ―Έμ§ μλͺ
(Cosign)
cosign sign --yes ghcr.io/myorg/myapp:latest
# 6. SLSA Provenance κ²μ¦
slsa-verifier verify-artifact myapp.tar.gz \
--provenance-path myapp.tar.gz.intoto.jsonl \
--source-uri github.com/myorg/myapp
# 7. Kubernetes μ μ±
(Kyverno - μλͺ
λ μ΄λ―Έμ§λ§ νμ©)
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: require-signed-images
spec:
validationFailureAction: Enforce
rules:
- name: verify-signature
match:
resources:
kinds:
- Pod
verifyImages:
- imageReferences:
- "ghcr.io/myorg/*"
attestors:
- entries:
- keyless:
issuer: "https://token.actions.githubusercontent.com"
# 8. CI νμ΄νλΌμΈ 보μ (GitHub Actions)
# - μ΅μ κΆν μμΉ (permissions)
# - OIDC ν ν° μ¬μ© (id-token: write)
# - Dependabot νμ±ν
# - branch protection μ€μ
CISO: "During Log4j, it took us several days to figure out which of our services were affected. Without an SBOM, there is no supply chain visibility."
DevOps: "What should we do to automatically generate SBOMs and receive vulnerability alerts?"
CISO: "Generate the SBOM with Syft in CI, scan it with Grype, and manage it centrally with Dependency Track."
Interviewer: "Please explain your software supply chain security strategy."
Candidate: "I track all dependencies with an SBOM and verify build provenance with SLSA L3. I sign images with Sigstore and enforce signature verification with Kyverno. I control dependencies with a private registry and automatically patch vulnerabilities with Dependabot."
Take a mock interview on this topic β WIA SOOM AI Interview Β· Start for free
Reviewer: "The version in package.json is specified with ^. That is vulnerable to supply chain attacks. Pin it to an exact version."
Author: "I'll apply npm shrinkwrap and commit package-lock.json."