Skip to content

Conversation

woodruffw
Copy link
Member

This fixes a small edge case where a user supplies sha256:hash.jsonl or similar (such as produced by default by gh attestation) and the sigstore verify subcommands interpret it as an (invalid) hash rather than a file input.

The new behavior is to always interpret the input as a path if a file at that path is extant, and to otherwise interpret it as a hash.

CC @facutuesca

Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw woodruffw added the component:cli CLI components label Oct 2, 2024
@woodruffw woodruffw requested a review from jku October 2, 2024 19:58
@woodruffw woodruffw self-assigned this Oct 2, 2024
Signed-off-by: William Woodruff <william@trailofbits.com>
Copy link
Collaborator

@facutuesca facutuesca left a comment

Choose a reason for hiding this comment

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

...that was an edge case that I wasn't expecting at all.

LGTM! I'll make a note to add a test for it when we write the CLI verify tests

@jku jku merged commit c31db82 into main Oct 3, 2024
27 checks passed
@jku jku deleted the ww/file-priority branch October 3, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cli CLI components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants