-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Generate PEP 740 attestations for PyPI #12981
Conversation
Output from https://github.com/AA-Turner/sphinx/actions/runs/11203683364/job/31141226284:
A |
A question / observation: the attestation doesn't appear to provide a reference back to the original source code revision (git commit, in this case) that the attested artifact was built from. As a consumer of provenance data, I'd like in future to be able to navigate back to the source material (perhaps from an archive, if necessary), and then precisely locate the build revision, and compare/inspect/rebuild/etc from there. Note: I did briefly wonder whether the certificate subject (SAN?) would be the place to expect that information -- but the current value, that reflects the build process (the GitHub Action, in this case) I think is intentional per-design according to PEP-740:
(that seems to describe what the SAN should contain - but I might have misunderstood. I realize mentioning that field may seem slightly off-topic, but I want to figure out whether it's the expected location for an unambiguous source revision reference) |
I didn't follow the discussions around PEP 740, but yes it appears that there's no link to the SCM. This may have been intentional though, perhaps @woodruffw would know more. A |
The new
Notably, these include commit metadata. A |
# Conflicts: # .github/workflows/create-release.yml
# Conflicts: # .github/workflows/create-release.yml
There is one, but it's at a lower layer in the format: the X.509 certificate contains extensions corresponding to the machine identity/workflow identity of the CI job that ran the attestation step, and one of those extensions is the commit SHA. The full set of extensions and how they map to individual CI providers (like GHA) is here: https://github.com/sigstore/fulcio/blob/main/docs/oid-info.md |
Thank you, @woodruffw! |
Commenting here for future reference / to complete the thread: in fact the attestation does already include these details; my observation was based only on the output of |
PEP 740