// Security · 12
Software Supply Chain Security
Every dependency, build step and tool runs with your rights, so pin it, check it and give it less.
How it fits together
- Hijacked maintainer fails / error path Package registry (1 poisoned release)
- Package registry fails / error path CI pipeline (2 blocked by lockfile)
- CI pipeline uses / calls Cloud and repo secrets (3 minutes-long token)
- CI pipeline creates SBOM per release (4 list what shipped)
Spot it
- npm install or a CI job runs scripts from packages nobody reviewed
- CI holds long-lived cloud keys or a publish token
- Nobody can say which version of a library is in production
It costs
Slower upgrades and more pipeline setup, in exchange for not running a stranger's code with your keys.
Go deeperThe full explanation and what to ask for · 2 min readExpandCollapse
Your application is mostly other people's code: packages, base images, build actions, IDE extensions and now MCP servers and AI tools. Each one runs with the rights of whatever installs or calls it. An attacker who takes over one maintainer account, one release workflow or one popular action does not need to attack you directly; your own build fetches and runs the payload. The usual payload steals what the build can reach: npm and GitHub tokens, cloud keys, SSH keys, then uses them to spread to the next package.
Defence is mostly about removing automatic trust. Lockfiles and npm ci make installs repeatable, so a new malicious version does not arrive on its own. Turning off install scripts removes the most common way a package runs code on install. Pin CI actions to a commit SHA, not a tag that can be moved. Replace long-lived secrets in CI with OIDC tokens that live minutes and are scoped to one job, and give each workflow the least permissions it needs. A short cooldown before adopting a new version catches most hijacked releases, because they are usually found and pulled within days.
Then make it visible. An SBOM lists what is inside each release, so when a critical CVE lands you can answer "are we affected?" in minutes instead of days, and patch what is exposed first. Signed provenance shows a package was built by the pipeline it claims. When NOT to go all the way: a prototype with a handful of dependencies needs lockfiles and no secrets in CI, not a full SLSA setup.
Ask for it
- lockfile / pinned version
- install scripts (postinstall)
- pin actions to a commit SHA
- OIDC workload identity
- SBOM
- signed build provenance (SLSA)
Harden our build: commit lockfiles and install with npm ci, turn off install scripts, pin every GitHub Action to a commit SHA, replace stored cloud keys in CI with OIDC short-lived tokens, give each workflow read-only permissions by default, produce an SBOM per release and alert on new critical CVEs in it, and delay adopting brand-new package versions by a few days.