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

pullbuildpublishreleaseSourcecommits, PRsDependenciesnpm, PyPI, imagesBuild / CIrunners, actionsArtefactsregistryDeploycluster, servers
Every link is a potential attack point.

Common attacks and defences

AttackExampleDefence
Typosquattingreqeusts instead of requestsAllow-lists, careful review, lockfiles
Maintainer account takeoverMalicious version of a popular package2FA for maintainers, delayed adoption, provenance
Install-script malwarepostinstall steals tokensDisable scripts where possible, sandbox installs
Compromised CI actionTag moved to malicious commitPin actions to SHAs
Tampered artefactSwapped image in registrySigning + admission verification
Secret leakage from CITokens printed or exfiltratedOIDC, short-lived credentials, least privilege

Layered defences

Verify at deploysignature + policy checksProve integritysigning, SLSA provenanceHarden buildpinned deps/actions, isolated runnersManage dependencieslockfiles, SBOM, updates, scanningSecure sourcebranch protection, reviews, signed commits
Defence in depth across the chain.

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.txt

Disable 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.2

Common 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.

More Security articles