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

Add bundle create helper command #3901

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

steiza
Copy link
Member

@steiza steiza commented Oct 9, 2024

Summary

Working towards #3139.

There are several cosign commands that now support the new protobuf bundle format. Users may have signed material in other formats, and this pull request adds a cosign bundle create... helper to assemble that material into a new protobuf bundle for use with the work in #3139.

You can test this with something like:

$ go run cmd/cosign/main.go attest-blob --bundle "old.bundle" --identity-token="..." --type=something --predicate=predicate.txt ../sigstore-go/examples/sigstore-go-signing/hello_world.txt
$ go run cmd/cosign/main.go bundle create --bundle=old.bundle --attestation=intoto.txt --artifact=../sigstore-go/examples/hello_world.txt --out test.sigstore.json
$ go run cmd/cosign/main.go verify-blob-attestation --bundle="test.sigstore.json" --new-bundle-format=true --type=something --certificate-oidc-issuer="https://token.actions.githubusercontent.com" --certificate-identity="https://github.com/sigstore-conformance/extremely-dangerous-public-oidc-beacon/.github/workflows/extremely-dangerous-oidc-beacon.yml@refs/heads/main" ../sigstore-go/examples/sigstore-go-signing/hello_world.txt

Release Note

  • Added cosign bundle create command to assist users in assembling signed content into the new protobuf bundle format to use in cosign verification commands

Documentation

sigstore/docs#327

Signed-off-by: Zach Steindler <[email protected]>
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 20.85714% with 277 lines in your changes missing coverage. Please review.

Project coverage is 36.19%. Comparing base (2ef6022) to head (ff8128a).
Report is 225 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/bundle/bundle.go 13.60% 95 Missing and 13 partials ⚠️
cmd/cosign/cli/verify/verify_bundle.go 23.94% 99 Missing and 9 partials ⚠️
cmd/cosign/cli/options/bundle.go 0.00% 40 Missing ⚠️
cmd/cosign/cli/bundle.go 47.50% 20 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3901      +/-   ##
==========================================
- Coverage   40.10%   36.19%   -3.91%     
==========================================
  Files         155      206      +51     
  Lines       10044    13144    +3100     
==========================================
+ Hits         4028     4758     +730     
- Misses       5530     7780    +2250     
- Partials      486      606     +120     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant