-
Notifications
You must be signed in to change notification settings - Fork 3
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
Usage with multiple-subject attestations #89
Comments
Hi @AA-Turner, sorry for the delayed response here! Yeah, this is a known problem -- we intentionally standardized PEP 740 around a single-subject assumption, since that most closely aligns with how PyPI and other index machinery works (i.e. all operations happen on single release files, there's no "batch" uploading). We could relax the requirement here (and within PEP 740, PyPI, etc.), but I'm wary about doing so because it subtly changes the verification model: instead of PyPI being able to fully assert that the subject of an attestation exactly matches the expected release file, the model becomes "1-of-N subjects match." This in turn enables a kind of confused deputy attack:
To work around this, PyPI could in theory allow multiple subjects, but only under the same project namespace. This complicates the index-side verification slightly (since we'd need to parse all subjects, not just reject non-matching ones), but it might be worth it. However, to take a step back: you're hitting this because you're using |
No worries!
Right, I'd only expect to be able to upload multiple subjects for projects I control, and probably only multiple subjects for the same version release of the same project.
My original attempt (see #55) used the CLI, but you told me not to :) (more accurately, that the Python API in this project is what we should rely on). I like using the A |
Yeah, sorry for the mixed messages here 😅 -- I'm trying to encourage people to use the API if at all possible, but I can understand if/why that's annoying in a CI/CD context.
Makes sense! Yeah, I would personally love it if On a related note, I think the APIs that GH uses to upload attestations are public, and I've been meaning to look into using those. If they are, it wouldn't be hard for me/my team to build a |
I've updated the other thread in actions/attest#213, hopefully we get a response on the GH side.
Don't worry! I wrote
The README of the action directs to the A |
GitHub's
actions/attest
changed in version 2 to produce a single Sigstore attestation for all artefacts, instead of the previous behaviour (one attestation per artefact). I've tried upgrading to this, but I hit the error stating that each statement must have exactly one subject. Is it possible to work around this, or should this be fixed inactions/attest
?https://github.com/trailofbits/pypi-attestations/blob/v0.0.21/src/pypi_attestations/_impl.py#L274-L275
I've opened a similar issue on the action repo: actions/attest#213
A
The text was updated successfully, but these errors were encountered: