Software supply chain attacks: instead of attacking the target directly, attack what they depend on — npm packages, pip libraries, container base images, build tools, CI/CD pipelines.
The category has exploded. SolarWinds, Log4Shell, npm package compromises — these are mainstream news. Defending against them requires deliberate work.
A library you depend on gets a malicious update. Your build pulls it; your software ships with it.
Examples:
Attacker gets into CI/CD; modifies builds before they're signed/distributed.
The SolarWinds attack: build pipeline modified; legitimate-signed binaries had backdoor.
Even legitimately-built software can be replaced in distribution. CDN compromise; mirror site replacement.
Cloud account compromise; container registry compromise. Software runs on infrastructure that's been altered.
Continuously scan dependencies for known vulnerabilities. CVE database is updated; your scanner checks.
Tools:
Scan in CI; block deploys with critical CVEs. Triage and patch quickly.
Don't use floating versions. 1.+ or latest means new versions enter without review.
Pin to specific versions; review updates before bumping.
package-lock.json, yarn.lock, Pipfile.lock, Gemfile.lock. Record exact versions of transitive dependencies. Reproducible builds; no surprise updates.
Modern package registries support cryptographic signing. Verify:
The package you install is what the maintainer published.
A list of everything in a build: every library, every transitive dep, every version, every license.
Standard formats: SPDX, CycloneDX.
Generated at build; published with releases. Customers can verify what's in the software.
Supply-chain Levels for Software Artifacts (pronounced "salsa"). Levels 1-4 of supply chain maturity.
For most organizations, Level 2-3 is the realistic target.
For sensitive enterprises, mirror package registries internally. Vet packages before they enter the mirror.
Slows velocity; adds security. Trade-off worth it for some.
Container images contain layers from base images. Each layer can have vulnerabilities.
Scan images:
Tools: Trivy, Grype, Snyk, ECR scanning, GCR vulnerability scanning.
The "FROM ubuntu:22.04" base image gets updates. Pull regularly; rebuild; redeploy. Otherwise vulnerabilities in the base accumulate.
Automate base image updates where feasible.
Same source + same dependencies = bit-identical output. Detects build-pipeline tampering.
Bazel and similar tools support this. Most casual builds aren't reproducible.
The build pipeline is high-value. Protect it:
Verify package source. Don't pull from arbitrary URLs.
Before adding a dependency, evaluate:
The cost of vetting is small; the cost of compromise is large.
Vulnerabilities discovered after release. Monitoring catches them; patching closes them.
Critical CVEs deserve fast response. Have an incident process for "Log4Shell-class" disclosures.
For high-security environments, builds run without internet access. All dependencies pre-mirrored. No surprise downloads.
For most projects:
Beyond this, signing, attestation, and reproducible builds for higher-stakes software.