-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add support for verifying digests to CLI verify commands #1125
Conversation
50d20c7
to
ea1560e
Compare
def __str__(self) -> str: | ||
""" | ||
Returns a str representation of this `Hashed`. | ||
""" | ||
return f"{self.algorithm.name}:{self.digest.hex()}" |
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.
Small unit test for this, please 🙂
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.
Done, see last commit
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 work @facutuesca! One small request for a unit test.
/gcbrun |
Signed-off-by: Facundo Tuesca <[email protected]>
ea1560e
to
6f50e6a
Compare
/gcbrun |
Signed-off-by: Facundo Tuesca <[email protected]>
/gcbrun |
/gcbrun |
Summary
This PR changes the
sigstore verify
CLI command so that it accepts digests as inputs (in addition to files).Concretely:
This is useful in scenarios where the user doesn't want/need to download the artifact, but has access to its digest.
Related to sigstore/sigstore-conformance#157
Release Note
sigstore verify
command now supports verifying digests. This meansthat the user can now pass a digest like
sha256:aaaa....
instead of thepath to an artifact, and
sigstore-python
will verify it as if it was theartifact with that digest.
Documentation
Example added to the README
cc @woodruffw