-
Notifications
You must be signed in to change notification settings - Fork 48
Bump cosign v2.4.1 to v3.0.4 and use trusted_root.json for verification #3108
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
base: main
Are you sure you want to change the base?
Conversation
Upgrade from cosign/v2 to cosign/v3 so that `ec sigstore initialize` produces the modern sigstore TUF cache format (trusted_root.json + signing_config) used by current cosign and gitsign. In the keyless verification path, ec now loads TrustedMaterial from trusted_root.json via cosign.TrustedRoot() before falling back to fetching individual Fulcio/CTLog/Rekor targets. This unifies the TUF library used for both initialization and verification. Dependency changes: - cosign v2.4.1 -> v3.0.4 - conftest v0.57.0 -> v0.66.0 (required for tablewriter v1 compat) - Go 1.24.6 -> 1.25.3 (required by conftest v0.66.0) Adapt to breaking API changes: - cosign.LoadPrivateKey now takes an additional *[]signature.LoadOption - cosignRemote.WriteSignedImageIndexImages now takes a directory param - fake.NewSimpleClientset replaced with fake.NewClientset Fix pre-existing acceptance test bug where the "Effective-time is honored" scenario used embedded quotes that the step regex could not match. Update OPA snapshot and generated docs to reflect new OPA/conftest help text. Signed-off-by: SequeI <asiek@redhat.com>
Review Summary by QodoUpgrade cosign to v3.0.4 and implement TrustedRoot.json verification
WalkthroughsDescription• Upgrade cosign from v2.4.1 to v3.0.4 with TrustedRoot.json support • Implement TUF-based verification using cosign.TrustedRoot() with fallback • Adapt to breaking API changes in cosign v3 (LoadPrivateKey, WriteSignedImageIndexImages, fake.NewClientset) • Update Go from 1.24.6 to 1.25.3 and conftest v0.57.0 to v0.66.0 • Fix acceptance test regex for "Effective-time is honored" scenario • Update OPA/conftest documentation to reflect new help text Diagramflowchart LR
A["cosign v2.4.1"] -->|upgrade| B["cosign v3.0.4"]
B -->|enables| C["TrustedRoot.json support"]
C -->|provides| D["TUF-based verification"]
D -->|with fallback| E["Individual Fulcio/CTLog/Rekor targets"]
F["Breaking API changes"] -->|adapt| G["LoadPrivateKey, WriteSignedImageIndexImages, fake.NewClientset"]
H["Go 1.24.6"] -->|upgrade| I["Go 1.25.3"]
J["conftest v0.57.0"] -->|upgrade| K["conftest v0.66.0"]
File Changes1. internal/policy/policy.go
|
Code Review by Qodo
1. Empty dir arg to cosignRemote
|
Upgrade from cosign/v2 to cosign/v3 so that
ec sigstore initializeproduces the modern sigstore TUF cache format (trusted_root.json + signing_config) used by current cosign and gitsign.In the keyless verification path, ec now loads TrustedMaterial from trusted_root.json via cosign.TrustedRoot() before falling back to fetching individual Fulcio/CTLog/Rekor targets. This unifies the TUF library used for both initialization and verification.
Dependency changes:
Adapt to breaking API changes:
Fix pre-existing acceptance test bug where the "Effective-time is honored" scenario used embedded quotes that the step regex could not match.
Update OPA snapshot and generated docs to reflect new OPA/conftest help text.
Closes #3107