Improve json output of cosign verify
#1393
Closed
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.
Summary
Separates the payload, cert and bundle output into separate fields, rather than stuffing the latter two into the former.
I've also added the TUF timestamp. Is this actually useful to have in the output?
I've omitted the chain, because I'm not sure what fields in the certificates are or aren't useful to include. Including the whole cert definitely feels like overkill.
The annotations seem to be where all the former information (excluding the payload) are actually stored, so I'm not including that.
As I'm not particularly informed about the underlying implementation of signatures, I would appreciate any guidance on whether this seems like a good way to represent a signature and if there's any other information that it would be good to include.
Examples
A couple of examples of the output. This is indented with
jq -r .
for readability.Signed with a static key pair...
Keyless
Ticket Link
Fixes #1370
Release Note