1import hashlib, sys2wheel, pin = sys.argv[1:3]3with open(wheel, "rb") as f:4 got = hashlib.sha256(f.read())5if got.hexdigest() != pin:6 sys.exit("mismatch: refuse")7print("hash ok: install")PyPIBUILDpin 2a0d60c1…78e00–12–34–56–701requestsurllib3idnacertificharset-normalizerADVISORIES
Back: registry, build server, production; left: the hash checkerMiddle: lock file, digest cells, match lamp; front: SBOM and advisory databaseTokens: the package, a changed copy, an audit query, the signed releaseAt the back, the supply chain: the PyPI registry, the build server and the production server. Installing requests brings four more packages with it. pip-audit flags requests 2.31.0 and the project upgrades to 2.34.2, then pins the file's SHA-256 in a lock file. A seven-line Python checker accepts the genuine wheel and refuses a copy with one changed byte. An SBOM lists every component, the build records its provenance, and production verifies the signed release before running it. The digests are real: SHA-256 of requests-2.34.2-py3-none-any.whl (73,075 bytes) as listed on PyPI and re-hashed on 2026-11-06. The "changed" digest is that same file with its last byte flipped. The figure shows the first 8 of the 32 bytes.

The chain

  1. Your app is more than your code. It runs packages other people wrote, downloaded from a registry. A build server turns it all into a release, which is deployed. That whole path is the software supply chain, and every link can fail.

Checking what you install

Building and shipping

What happens

;; step 1/11 · chain
your code        what your team writes
dependencies     packages other people wrote
registry         where they are downloaded from (PyPI)
build server     turns code + packages into a release
production       where the release runs
supply chain     the whole path, every link

The digests are real: SHA-256 of requests-2.34.2-py3-none-any.whl (73,075 bytes) as listed on PyPI and re-hashed on 2026-11-06. The "changed" digest is that same file with its last byte flipped. The figure shows the first 8 of the 32 bytes. Versions and advisories were checked against PyPI and the OSV database on 2026-11-06. New advisories appear all the time, so audits run again on every build, not once.