Verify Python deployments
Deploy a git checkout and create the virtual environment from a lockfile that pins file hashes. The attester hashes every file in the checkout, every file each installed distribution's RECORD lists, the scripts in the environment's bin/, and its start-up hook, and inspects each Python process. The verifier downloads the wheel whose SHA-256 the lockfile pins, checks it, and compares its contents with what is installed, following the wheel install rules.
| Lockfile | uv.lock, pylock.toml, poetry.lock, Pipfile.lock, requirements.lock or requirements.txt with hashes |
|---|---|
| Reference | PyPI wheel by pinned SHA-256, compared through its RECORD |
| What is verified | site-packages of each virtual environment, bin/ scripts, the environment's start-up hook |
How it works
The lockfile is read at the deployed commit, from the verifier's own clone of the public repository, never from the server. Every package is compared with the reference the lockfile pins, fetched and checked by hash. Besides the packages, the deployed files are compared with the commit, every process of the service is inspected, and every running executable and library is explained by a reference. A reference that cannot be fetched makes the result inconclusive, never passing.
The Python guide
The Python guide covers the setup for the project, the attester and the verifier:
- What gets verified
- Requirements
- Attester configuration
- Verifier configuration
- Build and deploy
- Common findings
- Limits