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

Search for provenance on rekor #59

Open
asraa opened this issue Feb 23, 2022 · 1 comment
Open

Search for provenance on rekor #59

asraa opened this issue Feb 23, 2022 · 1 comment

Comments

@asraa
Copy link
Owner

asraa commented Feb 23, 2022

rekor's intoto entry is kinda borked (sigstore/rekor#582): the rekor entry stores the unsigned payload in the attestation field of the entry, and then stores the hash of the entire envelope (incl sigs) in the entry along with the signing cert.

right now we can get around this by looking for IntotoObjs on rekor associated to the binary found in the Subject.Digest of the provenance, but I can't get a search by the hash of the unsigned prov to work, and search by the whole envelope is not supported either

there's a PR out for a new type to fix these issues

for now, I have the binary and the signed provenance and I can:

  • I'll search by the binary artifact digest to get the rekor entry. I may get multiple entries by Subject.Digest
  • Select the right rekor entry by (1) matching the Attestation with the unsigned provenance payload. (TODO: because of PAE stuff, I don't know how to verify the hash of the whole signed envelope against the signed provenance) or (2) iterating through each entry and verifying my signed provenance against each of the signing certs
  • Extract the signing certificate from the entry
  • Verify-blob the signed payload with the signing certificate

Then extract the workflow with the referenes from the signing certificate.

@laurentsimon
Copy link
Collaborator

sgtm!

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

No branches or pull requests

2 participants