Skip to content

👷 ci(release): verify the zipapp served by bootstrap.pypa.io - #3309

Merged
gaborbernat merged 2 commits into
pypa:mainfrom
gaborbernat:ci/verify-bootstrap-zipapp
Sep 23, 2026
Merged

gaborbernat merged 2 commits into
pypa:mainfrom
gaborbernat:ci/verify-bootstrap-zipapp

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

The release verify job compares the PyPI files and the GitHub Release zipapp with the build output, but the install docs send users to https://bootstrap.pypa.io/virtualenv.pyz and https://bootstrap.pypa.io/virtualenv/x.y/virtualenv.pyz. No step checked that those URLs serve the attested file. 🔍

bootstrap.pypa.io is a container that pypa/bootstrap builds from pypa/get-virtualenv: its Dockerfile copies public/ to /virtualenv/ and public/virtualenv.pyz to the root, a monitor workflow polls get-virtualenv every 15 minutes, and purge.sh purges the CDN after each deploy. A new verify-bootstrap job runs after verify, downloads the root, /virtualenv/ and every per-Python path that get-virtualenv symlinks to the latest zipapp, compares each byte for byte with the release asset, and runs gh attestation verify with the same signer, ref and digest checks as the release zipapp step. Each download has a five minute timeout and three retries, and the job polls once a minute for up to two hours before it fails with the version bootstrap.pypa.io/virtualenv/version.txt reports. The job only reads, so a failure changes no published file and does not trigger the recovery job. It reads get-virtualenv only to list paths, so it works however the release updates that repository, including the change in #3301. The roadmap listed this check as planned work, so I dropped that entry.

⚠️ The pypa/bootstrap monitor failed from August until pypa/bootstrap#12, because buildout/buildout deleted the branch it polled. bootstrap.pypa.io served 21.7.4 during that time. That PR pinned buildout's script, and the root virtualenv.pyz now matches the 21.10.0 release asset byte for byte.

@gaborbernat gaborbernat added the security Fixes a vulnerability or hardens the supply chain, CI or release label Sep 23, 2026
The release verify job checked the files on PyPI and the GitHub
Release, but the install docs point users at bootstrap.pypa.io, which
pypa/bootstrap builds from get-virtualenv. Nothing confirmed that copy
matched what the release workflow built and attested.

Add a job after verify that downloads the root, /virtualenv/ and
per-Python paths, compares each byte for byte with the release asset and
checks it against the release provenance. pypa/bootstrap polls
get-virtualenv every 15 minutes before it rebuilds and purges the CDN,
so the job retries for up to two hours. It only reads, so a failure
leaves PyPI, the GitHub Release and get-virtualenv untouched and does
not start the recovery job.

The roadmap listed this check as planned work; drop the entry.
@gaborbernat
gaborbernat force-pushed the ci/verify-bootstrap-zipapp branch from a00b209 to 24baffa Compare September 23, 2026 00:54
@gaborbernat
gaborbernat merged commit d10b8e8 into pypa:main Sep 23, 2026
65 checks passed
@gaborbernat
gaborbernat deleted the ci/verify-bootstrap-zipapp 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

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