-
Notifications
You must be signed in to change notification settings - Fork 11
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
Question regarding verify_cert_identity when using the GitHub Actions credential #158
Comments
Hi @Lucas-C, thanks for opening an issue! FWIW: if you're publishing a Python project with In your case it looks like you're already doing so: and the attestations are live on PyPI e.g. here: https://pypi.org/project/fpdf2/#fpdf2-2.8.2.tar.gz One current limitation of that is that it only uploads the attestations to PyPI, not to GitHub itself. That's being tracked here: pypa/gh-action-pypi-publish#288 However, to answer your actual question:
where In other words, this should be correct: verify-cert-identity: https://github.com/py-pdf/fpdf2/.github/workflows/continuous-integration-workflow.yml@refs/heads/master I'd also recommend experimenting with |
Thank you very much @woodruffw 🤩 I'm going to experiment with the One thing I did not figure out yet is: where to retrieve a EDIT: Example test I'm performing: $ pip install sigstore
$ wget https://files.pythonhosted.org/packages/b0/54/0e86f986e81abad9e6b348f5176048a2aa046920d46292c42a581064d93e/fpdf2-2.8.2.tar.gz
$ sigstore verify github fpdf2-2.8.2.tar.gz --repository=py-pdf/fpdf2 --sha b9cfbb6d8ca1eb034e826fd358194e899a1daf28
usage: sigstore [-h] [-v] [-V] [--staging | --trust-config FILE] COMMAND ...
sigstore: error: Missing verification materials for fpdf2-2.8.2.tar.gz: fpdf2-2.8.2.tar.gz.sigstore.json |
I tried to dig a little further... I found a comment from 18 months ago on https://github.com/sigstore/sigstore-python that implies that However I was not able to download them for the latest
I also found that the GitHub workflow generated
Note: this workflow run used the Docker image I also tried to use the pypi-attestations project/tool, but it seems to also require a
Hence my question: why no |
They were uploaded, but they're not served at TL;DR: They are uploaded to PyPI, but you need to access them via the simple HTML index (PEP 503) or JSON API (PEP 691) -- you can't just hit a URL and fetch them, since they get merged together 🙂 |
Alright, thank you very much for your answer 👍 Are there plans for the I'm thinking about a command like:
|
Nobody else has raised it, but I really like the idea of having this available from the I'll open up a separate tracking issue on |
Awesome @woodruffw, thank you! I tested retrieving the signature/provenance file from Pypi, but it seems that it does not produce a valid
I also tested using pypi-attestations:
|
Yeah, sorry for the confusion there -- that's because the The CLI interfaces here are pretty shoddy at the moment, but I'm working on improving those. The Sphinx maintainers hit a similar set of rough edges; the resolution is here: trailofbits/pypi-attestations#55 (comment) |
For the record, I got something working using those commands to select the 1st attestation:
It requires Regarding |
Glad to hear you got it working! Sorry for the confusion there.
Makes sense. FWIW in the case of multiple attestations you can do one-of-N, and that's what |
@Lucas-C we haven't cut a release for it yet, but the CLI changes here (trailofbits/pypi-attestations#82) should make it much easier to experiment with provenance JSON that's been pulled from PyPI. |
Thank you @woodruffw! That is a very handy subcommand, thanks for introducing it 👍 I added a short paragraph to our documentation to give some pointers to our users on how to use Could you have a quick look and tell me if what I wrote in this paragraph is correct, please? Moreover, I have a couple of feature requests:
Could/should I open issues for those feature requests on https://github.com/trailofbits/pypi-attestations? |
Those steps look correct to me!
Yes, please do! A larger design pressure here is that we're trying to avoid inventing new syntax and we don't want |
Thank you for taking a look 👍 I merged the PR, it's now part of
Alright, I understand. I opened those issues: |
Hi!
I'm trying to setup
sigstore
on https://github.com/py-pdf/fpdf2I just switched to
v3.0.0
and discovered the newupload-signing-artifacts
setting, which I'm going to enable today, so that for the next release sigstore bundles can be downloaded as GitHub job artifacts.PR: py-pdf/fpdf2#1331
I also wanted to enable verify, but I'm a bit hesitant regarding the value to provide for
verify-cert-identity
when using this GitHub Action and the OIDC token used for signing comes from GitHub?If I'm not mistaken, a similar
--cert-identity
value will have to be provided tosigstore verify identity
when end users will want to verify afpdf2
package version against a sigstore bundle.And again, I'm not sure which value to provide, and it does not seem displayed in the GitHub Action log.
Could you please provide some guidance regarding this? 🙂
The text was updated successfully, but these errors were encountered: