Switch from GPG to Sigstore for Python source verification #1924
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The build scripts that download and compile the Python source archives (for upload to S3, where they are then consumed by the buildpack during customer builds) currently use GPG to verify the Python source archive downloads.
However, use of PGP signatures for Python artifact verification was deprecated previously in PEP 761, in favour of Sigstore:
https://peps.python.org/pep-0761/
https://www.python.org/downloads/metadata/sigstore/
Until now the PGP signatures have still been available for all stable releases, however, as of Python 3.14 (due to be released this week), Sigstore will be the only supported verification mechanism:
https://docs.python.org/3.14/whatsnew/3.14.html#whatsnew314-no-more-pgp
As such, we must now switch over to Sigstore.
We use the
cosignCLI for verification since it's a standalone binary available via a Docker image, rather than the PythonsigstoreCLI which requires a Python environment (and so would need pip, venv etc, and more setup to ensure it stays isolated from the Python we're trying to build).See:
GUS-W-18244071.