Skip to content
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

feat: allow to verify-blob from urls #646

Merged
merged 1 commit into from
Sep 14, 2021
Merged

feat: allow to verify-blob from urls #646

merged 1 commit into from
Sep 14, 2021

Conversation

caarlos0
Copy link
Contributor

@caarlos0 caarlos0 commented Sep 11, 2021

A minor quality of life improvement, allowing the blob and signature to come from a url as well, so we can, for instance:

cosign verify-blob \
              -key https://raw.githubusercontent.com/caarlos0/goreleaserfiles/main/cosign.pub \
              -signature https://github.com/caarlos0/tasktimer/releases/download/v1.9.0/checksums.txt.sig \
              https://github.com/caarlos0/tasktimer/releases/download/v1.9.0/checksums.txt

previous behaviors (from file and base64 string) still work as before.

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
@lukehinds
Copy link
Member

lukehinds commented Sep 11, 2021

I would consider the security impacts here and consider using rekor instead (gather the signaturess by look up using digest). If someone compromises github.com/caarlos0 then they can dupe users into accepting a compromised container / blob and its respective pub key and signature etc with no open transparency for others to monitor. This was the driver for making rekor, as too many folks were storing artifacts and signatures alongside each other.

Copy link
Member

@lukehinds lukehinds left a comment

Choose a reason for hiding this comment

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

would like to just hold for a bit while we discuss this over.

@dlorenc
Copy link
Member

dlorenc commented Sep 11, 2021

There are no issues here IMO, I think you're misunderstanding the patch based on the example in the commit message. This would work with the transparency log if the experimental variable is set.

@lukehinds could you explain the actual threat you're worried about in more detail? I don't think this introduces anything new or makes anything worse.

This command would be run before a rekor-cli lookup, or use the built in transparency support if that's desired/important.

@lukehinds
Copy link
Member

You're right, did not articulate my comment to well, there is no new attack. For me it's a bit more about encouraging users into good habits to utilize rekor for public transparency (and detect key compromise etc). But I can see how this patch is a layer above that and its contingent upon cosign_experimental being set.

This command would be run before a rekor-cli lookup

I might be misunderstanding verify-blob here, is this not to verify the blog signing, if so I would have thought you would want to check its in the tlog first?

Copy link
Member

@lukehinds lukehinds left a comment

Choose a reason for hiding this comment

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

toggle off hold after speaking with Dan.

@cpanato cpanato added this to the v1.2.0 milestone Sep 12, 2021
@dlorenc dlorenc merged commit c37c20e into sigstore:main Sep 14, 2021
@caarlos0 caarlos0 deleted the from-url branch September 15, 2021 00:59
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.

None yet

4 participants