-
Notifications
You must be signed in to change notification settings - Fork 64
Use sigstore for Python artifact verification #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
&& apk add --no-cache --virtual .cosign cosign \ | ||
--repository="https://dl-cdn.alpinelinux.org/alpine/v3.21/community" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Python sigstore bundle use the new bundle format, the verification of which requires cosign>=4.2.0
. Unfortunately alpine 3.21
is the earliest release with in this case version 4.2.1
. The additional repository is necessary until 3.19
and 3.20
are dropped.
There is a draft PR to add sigstore validation to the "official" Python docker images which uses a similar approach. docker-library/python#983
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice change, thanks!
|
||
# ensure local python is preferred over distribution python | ||
ENV PATH /usr/local/bin:$PATH | ||
ENV PATH=/usr/local/bin:$PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I think the space variant also did not expand $PATH... I wonder how certain things even worked with that in mind 🤔
Anyways, this is the right thing to do 👍
CI is all green now |
PEP 761 deprecated the PGP signatures for CPython artifacts. Python 3.14 will only support verification with sigstore.
As all releases since
3.11.0
include sigstore bundles, we can already update all docker files to use that instead.https://www.python.org/downloads/metadata/sigstore/
--
Also fix a minor warning in the dockerfile regarding
ENV
https://docs.docker.com/reference/dockerfile/#env