Skip to content

Conversation

facutuesca
Copy link
Collaborator

@facutuesca facutuesca commented Jan 10, 2025

The verify CLI subcommand is now split into two:

  • verify attestation, which behaves as the previous verify command (verifies an artifact and its corresponding PEP740 attestation)
  • verify pypi, which takes the URL of a distribution hosted on PyPI and a signing identity and verifies them.

Examples:

$ pypi-attestations verify pypi https://files.pythonhosted.org/packages/f0/d5/1341f23a51e45b7780ed6e0b1df3efc9ec4350a528b3f15ec83146edd6ab/abi3info-2025.1.9-py3-none-any.whl --repository https://gitlab.com/woodruffw/abi3info
Verification failed: provenance was signed by a github.com repository, but expected a gitlab.com repository

$ pypi-attestations verify pypi https://files.pythonhosted.org/packages/f0/d5/1341f23a51e45b7780ed6e0b1df3efc9ec4350a528b3f15ec83146edd6ab/abi3info-2025.1.9-py3-none-any.whl --repository https://github.com/evil/abi3info
Verification failed: provenance was signed by repository "woodruffw/abi3info", expected "evil/abi3info"

$ pypi-attestations verify pypi https://files.pythonhosted.org/packages/f0/d5/1341f23a51e45b7780ed6e0b1df3efc9ec4350a528b3f15ec83146edd6ab/abi3info-2025.1.9-py3-none-any.whl --repository https://github.com/woodruffw/abi3info
OK: abi3info-2025.1.9-py3-none-any.whl

See sigstore/sigstore-python#1271 for context

@facutuesca facutuesca force-pushed the ft/cli-verify-pypi branch 7 times, most recently from 5b901e5 to 7781d09 Compare January 10, 2025 17:00
Signed-off-by: Facundo Tuesca <facundo.tuesca@trailofbits.com>
Signed-off-by: Facundo Tuesca <facundo.tuesca@trailofbits.com>
Signed-off-by: Facundo Tuesca <facundo.tuesca@trailofbits.com>
The `verify` CLI command is now split into two:
- `verify attestation`, which behaves as the previous `verify` command
- `verify pypi`, which takes the URL of a distribution hosted on PyPI
   and a signing identity and verifies them.

Signed-off-by: Facundo Tuesca <facundo.tuesca@trailofbits.com>
Signed-off-by: Facundo Tuesca <facundo.tuesca@trailofbits.com>
@facutuesca facutuesca marked this pull request as ready for review January 10, 2025 17:07
@facutuesca facutuesca requested a review from woodruffw January 10, 2025 17:07
@woodruffw
Copy link
Member

Nice, thanks @facutuesca! I'll do a review pass today.

@woodruffw
Copy link
Member

(As a follow-on, let's look at updating the PyPI docs as well to point users to these commands in an "internals" or "experts" section.)

Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @facutuesca!

@woodruffw woodruffw merged commit 322dde1 into main Jan 10, 2025
7 checks passed
@woodruffw woodruffw deleted the ft/cli-verify-pypi branch January 10, 2025 18:35
@facutuesca
Copy link
Collaborator Author

(As a follow-on, let's look at updating the PyPI docs as well to point users to these commands in an "internals" or "experts" section.)

done here: pypi/warehouse#17391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants