Software Supply Chain Security Explained: From Dependencies to Deployment
What software supply chain attacks are, where they happen (dependencies, build systems, CI, registries), and the layered defences every team should adopt.
Published December 4, 2026
Modern applications are mostly other people's code: open-source packages, base images, build tools, CI actions and cloud services. Attackers have noticed. Instead of breaking into your application directly, they compromise something you depend on and let your own pipeline deliver the malware. Supply chain security protects every step from source code to running software.
The concept
Attacks target several links. Malicious or hijacked packages (typosquatting, account takeovers, self-replicating npm worms seen in recent years) execute code at install time. Compromised build systems or CI pipelines inject code into otherwise clean source. Tampered artefacts in registries swap images or binaries. Leaked CI secrets give attackers publishing rights.
Defences are layered: know what you depend on (lockfiles, SBOMs), choose and update dependencies carefully (provenance, maintainer health, automated updates with review), harden the build (pinned actions, least-privilege tokens, isolated builders), prove integrity (signing and provenance attestations, frameworks like SLSA), and verify at deployment (admission policies that only accept signed, scanned artefacts).
The software supply chain
Common attacks and defences
| Attack | Example | Defence |
|---|---|---|
| Typosquatting | reqeusts instead of requests | Allow-lists, careful review, lockfiles |
| Maintainer account takeover | Malicious version of a popular package | 2FA for maintainers, delayed adoption, provenance |
| Install-script malware | postinstall steals tokens | Disable scripts where possible, sandbox installs |
| Compromised CI action | Tag moved to malicious commit | Pin actions to SHAs |
| Tampered artefact | Swapped image in registry | Signing + admission verification |
| Secret leakage from CI | Tokens printed or exfiltrated | OIDC, short-lived credentials, least privilege |
Layered defences
Practical examples
Install exactly what the lockfile says
Reproducible installs in CI.
npm ci # never npm install in CI
pip install --require-hashes -r requirements.txtDisable install scripts for untrusted installs
Many attacks run in lifecycle scripts.
npm ci --ignore-scripts
# or in .npmrc: ignore-scripts=true (then allow-list packages that truly need scripts)Pin a GitHub Action to a commit SHA
Tags can be moved; SHAs cannot.
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2Common mistakes
- Running npm install (not ci) in pipelines, pulling unexpected versions.
- Long-lived publishing tokens stored in CI secrets.
- Trusting packages by popularity alone.
- No inventory of dependencies when a major vulnerability is announced.
Key takeaways
- Attackers target dependencies, builds, CI and registries.
- Lockfiles, SBOMs and scanning tell you what you ship.
- Harden CI: pinned actions, least privilege, OIDC.
- Sign artefacts and verify signatures before deploy.
FAQ
Is open source unsafe?
No, but it requires the same diligence as any supplier: inventory, updates, verification and monitoring.
What is an SBOM?
A Software Bill of Materials listing every component and version in an artefact, used for vulnerability response and compliance.
Where should a small team start?
Lockfiles and npm ci, automated dependency updates with review, pinned CI actions, and secret scanning.