What Is the Software Supply Chain?
Every program you ship is mostly code you didn't write. A small web service pulls in hundreds of open-source packages, runs on a base image someone else assembled, is compiled by a toolchain you downloaded, and is built by a CI system that holds your release keys. Each of those is a link in your software supply chain, and an attacker who controls any one of them controls what your users run.
This course is about the questions a build engineer must be able to answer about every artifact they release:
| Question | Answered by | Lessons |
|---|---|---|
| What is in it? | a Software Bill of Materials (SBOM) | SPDX, CycloneDX, Syft |
| Is any of it known to be vulnerable? | vulnerability scanners, VEX | Grype, Trivy, OpenVEX |
| Is this the exact artifact we built? | content digests, signatures | OCI digests, cosign |
| Who built it, from which source, how? | provenance attestations | in-toto, SLSA |
| Would we notice a tampered build? | reproducible builds, policies | rebuilds, admission control |
Who this course is for
You have shipped software through CI and you know containers: the Docker course and Release Engineering & CI/CD are the background. The security vocabulary (hashes, public-key signatures, certificates, CVEs) comes from Cybersecurity, especially Hashing, Digital Signatures and Vulnerability Management. The ecosystem courses (JS packages, Python packaging, Go modules, Cargo, Maven & Gradle) explain the lockfiles that the scanners read.
A first session
Every bash session in this course is a real run in a container with Syft 1.55.0, Grype 0.121.0, Trivy 0.76.1, cosign 3.1.4, crane and oras, without network access. Samples live in /opt/samples: an old Node project, a Python requirements file, a Go module, the alpine:3.18.0 image and an SBOM of a Java service. Here is the whole idea of the course in four commands: list what a project contains, then ask which of those components have known vulnerabilities.
cp -r /opt/samples/node-app . && cd node-app
cat package.json
syft scan . -q
grype . -q -o json | jq -r '.matches[] | "\(.artifact.name)@\(.artifact.version) \(.vulnerability.id) \(.vulnerability.severity)"' | sort{
"name": "node-app",
"version": "1.0.0",
"private": true,
"dependencies": {
"lodash": "4.17.15",
"minimist": "1.2.5"
}
}
NAME VERSION TYPE
lodash 4.17.15 npm
minimist 1.2.5 npm
node-app 1.0.0 npm
lodash@4.17.15 GHSA-29mw-wpgm-hmr9 Medium
lodash@4.17.15 GHSA-35jh-r3h4-6jhm High
lodash@4.17.15 GHSA-f23m-r3pf-42rh Medium
lodash@4.17.15 GHSA-p6mc-m468-83gw High
lodash@4.17.15 GHSA-r5fr-rjxr-66jc High
lodash@4.17.15 GHSA-xxjr-mmjv-4gpg Medium
minimist@1.2.5 GHSA-xvch-5gv4-984h Critical
Read it from top to bottom:
package.jsonasks for two exact versions,lodash 4.17.15andminimist 1.2.5. Both were current in 2020.syft scan .readpackage-lock.jsonand listed the packages: that list is an SBOM, printed as a table.grype .matched each package against a vulnerability database and found advisories for both. The IDs are GitHub Security Advisories (GHSA-…); you'll see the CVE aliases in Vulnerability Data.
Note: The scanners in this course never update their databases: the Grype and Trivy databases were downloaded when this course's image was built (October 2026) and frozen. The lists you see are what the scanners reported at that time. A real CI job downloads a fresh database every day, so the same scan can find more tomorrow, which is exactly why you keep scanning old releases.
Where the frozen data is recorded
cat /opt/vulndb-info.txt | grep -E '^(Schema|Built|Status| Version| UpdatedAt)'Schema: v6.1.10
Built: 2026-10-23T06:30:15Z
Status: valid
Version: 2
UpdatedAt: 2026-10-23 13:13:41.529244645 +0000 UTC
Supply chain vs application security
Application security asks whether your code has bugs (SQL injection, XSS). Supply-chain security asks whether the code that reaches your users is the code you meant to ship. Most of this course has nothing to do with bugs in code at all:
- a perfectly safe package can be replaced by a malicious one with a similar name (Typosquatting);
- a correct source tree can produce a backdoored binary if the build machine is compromised (Threat Model);
- a signed, scanned image is useless if the deployment pulls a tag that someone moved (Tags vs Digests).
What this course covers
| Part | Lessons |
|---|---|
| Threats | the threat model, real incidents, typosquatting |
| Reproducibility | reproducible builds as a security control |
| SBOMs | formats, Syft, conversion and queries |
| Scanning | vulnerability data, Grype, Trivy, CI gates, ignore rules, VEX, why scanners disagree |
| Registries | manifests and digests, pinning, crane and oras |
| Signing | cosign key pairs, signature storage, attestations, policies, keyless |
| SLSA | build levels, provenance, GitHub attestations |
| Hygiene and policy | dependency confusion, hash pinning, update bots, Scorecard, admission control |
| Practice | two Toolkit lessons, two Field Notes lessons, exercises and a mini project that signs, attests and verifies an image end to end |
Test yourself
Which question does an SBOM answer?
- Who built the artifact
- What components the artifact contains
- Whether the artifact was tampered with after signing
- Which CVEs are exploitable
Why can the same grype scan of an unchanged lockfile report more vulnerabilities next month?
- Grype is non-deterministic
- The vulnerability database is updated as new advisories are published
- Lockfiles change by themselves
- Grype samples packages
Which of these is a supply-chain attack rather than an application bug?
- An SQL injection in your login form
- A malicious package published under a name similar to a popular one
- A missing CSRF token
- An integer overflow in your parser