feat: add attach attestation command#763
Open
Jaydeep869 wants to merge 6 commits intoin-toto:mainfrom
Open
Conversation
This commit adds a new command to attach attestations to an OCI artifact using the OCI referrers API. Resolves in-toto#602 Signed-off-by: jaydeep869 <jaydeeppokhariya2106@gmail.com>
✅ Deploy Preview for witness-project ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: jaydeep869 <jaydeeppokhariya2106@gmail.com>
Contributor
Author
Contributor
|
@Jaydeep869 |
…d tests Signed-off-by: jaydeep869 <jaydeeppokhariya2106@gmail.com>
Contributor
Author
|
Hey @manzil-infinity180, thanks for pointing out #661! I really appreciate your previous work on it, as it helped set a great foundation for this. I reviewed the maintainers' feedback on that PR and #602, and carefully added their requested changes into this implementation to resolve the previous blockers:
I believe this covers all the open gaps from #661! Let me know if you spot anything else we can refine and fix it. |
Signed-off-by: jaydeep869 <jaydeeppokhariya2106@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
Description
Adds the capability to attach attestations to an OCI artifact using the OCI referrers API, implementing the
witness attach attestationcommand. This enables developers and CI/CD systems to securely attach standard attestation formats (in-toto/DSSE) directly to a container image, making them discoverable alongside the artifact in the registry.The command supports:
--attestation(-a) flag.go-containerregistry.application/vnd.in-toto+jsonmedia type.Example usage:
Which issue(s) this PR fixes (optional)
Fixes #602
Acceptance Criteria Met
Special notes for your reviewer:
I used
google/go-containerregistry'sremote.Writeandmutate.Subjectmethods to create identical referrer representations of the local attestation payload. This mirrors the behavior of tools likecosign attach attestationsecurely uploading verifiable subject matter without requiring external CLIs.