Skip to content

📝 docs: explain what a release publishes and how to verify it - #3305

Merged
gaborbernat merged 2 commits into
pypa:mainfrom
gaborbernat:docs/verify-releases
Sep 23, 2026
Merged

gaborbernat merged 2 commits into
pypa:mainfrom
gaborbernat:docs/verify-releases

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Releases ship PyPI attestations and a provenance bundle for the zipapp, and with #3299 and #3310 merged the next release also attaches virtualenv.cdx.json, virtualenv.spdx.json and virtualenv.pyz.cdx.json, attested against the files they describe. Only docs/development.rst mentioned any of it, and it addresses maintainers. A user holding a wheel or virtualenv.pyz had no page telling them what the release contains or how to check it.

docs/reference/release-artifacts.rst becomes the one description of what a release publishes: the PyPI wheel and sdist with their attestations, every GitHub release asset, the bootstrap.pypa.io copies, each attestation's predicate type and subject, and what the wheel SBOM, its SPDX rendering and the zipapp SBOM hold. Its intro starts from the pre-release workflow, which pushes the tag that starts the release workflow. It also says that only Python 3.9 environments receive the embedded pip 26.0.1 and setuptools 82.0.1, which carry published advisories, and that creating environments for Python 3.10 or newer avoids them, since the fixed releases need 3.10. 🔐 docs/how-to/verify-release.rst holds the commands: uvx pip download and one uvx pypi-attestations verify pypi call per file for PyPI, gh attestation verify for the zipapp, reading the wheel SBOM, and matching each SBOM asset against its attestation and the copy inside the wheel or zipapp. A "Release integrity" section in the explanation covers trusted publishing, provenance, SOURCE_DATE_EPOCH builds, why the SBOMs exist, and what a passing check does and does not prove. docs/development.rst keeps the maintainer mechanics and links to both pages; the tutorial and the install page link to the how-to. The page paths stay at /reference/release-artifacts.html and /how-to/verify-release.html, which SECURITY.md has linked to since #3295.

I ran the PyPI, zipapp, wheel SBOM and sdist rebuild commands against 21.10.0 and pasted the real output. No release carries the SPDX or zipapp SBOM assets yet, so those sections use a <version> placeholder and show no output. The sdist rebuilds byte for byte from the tag; the wheel differs only in its SBOM and RECORD, since the SBOM records the build machine. https://bootstrap.pypa.io/virtualenv.pyz still serves 21.7.4 today, although pypa/get-virtualenv has 21.10.0 in public/version.txt, so the docs say the bootstrap copy can trail the latest release and fall back to comparing the SHA-256 with the digest GitHub lists for the release asset.

@gaborbernat gaborbernat added documentation security Fixes a vulnerability or hardens the supply chain, CI or release labels Sep 22, 2026
@gaborbernat gaborbernat changed the title docs: explain how to verify a release 📝 docs: explain what a release publishes and how to verify it Sep 23, 2026
Users and downstream packagers could not find, in one place, which files
a release publishes, which attestations cover them, or how to check a
download against the release workflow.

Make docs/reference/release-artifacts.rst the single description of the
PyPI files, GitHub release assets, SBOMs and attestations, and put the
verification commands in docs/how-to/verify-release.rst.
docs/development.rst keeps the maintainer mechanics and links there. The
page paths stay fixed because SECURITY.md links to them.
@gaborbernat
gaborbernat merged commit 1ad9702 into pypa:main Sep 23, 2026
65 checks passed
@gaborbernat
gaborbernat deleted the docs/verify-releases branch October 3, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation security Fixes a vulnerability or hardens the supply chain, CI or release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant