The chain
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.
Your project asks for requests 2.31.0, a popular Python package. pip downloads it from PyPI, the Python Package Index, plus the four packages it needs. Those are transitive dependencies: you never chose them, but their code runs inside your app.
OWASP ranks supply chain failures third in its 2025 Top 10. Common mistakes: an old version with known flaws, a look-alike package name, a version that changes without review, a hijacked maintainer account, or a tampered build server.
Checking what you install
pip-audit compares each version with a public advisory database. It flags requests 2.31.0: CVE-2024-35195 and two more, all fixed in later releases. The fix is to upgrade, here to 2.34.2, then run the check again.
Next, pin exactly what you trust. The lock file records each version and the SHA-256 hash of its file: requests==2.34.2 --hash=sha256:2a0d60c1…. Line 2 of the checker reads the file name and that pinned hash.
Lines 3 and 4 hash the downloaded wheel with SHA-256. Line 5 compares the result with the pin. They match, so line 7 says install. pip does this for every package when the lock file has hashes (--require-hashes).
Now one byte of the file is changed, say by a hijacked account or a bad mirror. The digest is completely different, so line 5 sees a mismatch and line 6 stops before any of the code inside can run.
Building and shipping
A software bill of materials (SBOM) lists every component with its supplier and version, transitive ones too. CISA calls it a nested inventory. When a new flaw is announced, like Log4Shell in 2021, you can see at once whether you use it.
Attackers also target the build: in 2020 they slipped malicious code into SolarWinds Orion updates. So build automatically from reviewed code, on an isolated server with few secrets and MFA, and record provenance: which source and steps made the release.
The build signs the release and publishes its hash. NIST's SSDF (practice PS.2) asks makers to give users a way to check integrity. The production server verifies the signature and hash before it runs anything; a mismatch means stop.
No single check is enough. Audit and update dependencies, pin and verify hashes, keep an SBOM, lock down the build and sign releases. NIST SP 800-218 (the SSDF) and SP 800-161 describe these practices for software makers and buyers.
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.