Skip to content

Conversation

@edmorley
Copy link
Member

@edmorley edmorley commented Oct 6, 2025

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 cosign CLI for verification since it's a standalone binary available via a Docker image, rather than the Python sigstore CLI 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.

The build scripts used to 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 `cosign` CLI for verification since it's a standalone binary
available via a Docker image, rather than the Python `sigstore` CLI
which requires a Python environment (and so pip, venv etc, and more
setup to ensure it stays isolated from the Python we're trying to
build).

See:
- https://www.python.org/downloads/metadata/sigstore/
- https://docs.sigstore.dev/cosign/system_config/installation/#container-images
- https://docs.sigstore.dev/cosign/verifying/verify/
- https://github.com/sigstore/cosign/blob/main/doc/cosign_verify-blob.md

GUS-W-18244071.
@edmorley edmorley self-assigned this Oct 6, 2025
@edmorley
Copy link
Member Author

edmorley commented Oct 6, 2025

@edmorley edmorley marked this pull request as ready for review October 6, 2025 11:00
@edmorley edmorley requested a review from a team as a code owner October 6, 2025 11:00
@edmorley edmorley enabled auto-merge (squash) October 6, 2025 11:07
@edmorley edmorley merged commit 5f8ddb6 into main Oct 6, 2025
21 of 22 checks passed
@edmorley edmorley deleted the sigstore branch October 6, 2025 11:15
@heroku-linguist heroku-linguist bot mentioned this pull request Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants