Skip to content

Conversation

@brandtkeller
Copy link
Member

@brandtkeller brandtkeller commented Nov 15, 2025

Description

Migrates Zarf package signing to the Sigstore bundle format, aligning with Cosign v3 standards and improving signature portability and verification capabilities.

Changes

The signing implementation now defaults to NewBundleFormat: true and generates both legacy signature files and the new bundle format (saved as zarf.bundle.sig). The SignPackage() function automatically configures the bundle path through the BundlePath option, ensuring all signing operations produce both formats for backward compatibility.

Verification logic implements a fallback strategy that prefers the bundle format over legacy signatures. When verifying packages, the system first checks for a bundle file, and if not found, falls back to the legacy signature format with a deprecation warning to inform users of the transition. Validation Package integrity checks now exclude bundle files from validation, treating them similarly to how legacy signature files are handled to prevent false validation errors.

The implementation maintains dual format support by generating both bundle and legacy signatures during signing operations. This enables a graceful migration path where verification prefers the modern bundle format but seamlessly falls back to legacy signatures with appropriate warnings. The bundle format is now enabled by default, aligning Zarf with Cosign v3 standards.

The bundle format significantly improves verification capabilities by including timestamps and transparency log entries, which enables verification of packages signed with short-lived certificates even after expiration. Existing packages with legacy signatures remain fully functional while new signatures automatically use the modern format. This sets the foundation for eventually deprecating legacy signature support.

Related Issue

Fixes #4296
Fixes #4276

Checklist before merging

@netlify
Copy link

netlify bot commented Nov 15, 2025

Deploy Preview for zarf-docs ready!

Name Link
🔨 Latest commit 2653894
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/691e08e821f17700086c4357
😎 Deploy Preview https://deploy-preview-4369--zarf-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

❌ Patch coverage is 50.54945% with 45 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pkg/utils/trustedroot.go 51.16% 15 Missing and 6 partials ⚠️
src/pkg/utils/cosign.go 0.00% 17 Missing ⚠️
src/pkg/packager/layout/package.go 77.41% 5 Missing and 2 partials ⚠️
Files with missing lines Coverage Δ
src/pkg/packager/layout/package.go 58.25% <77.41%> (+1.03%) ⬆️
src/pkg/utils/cosign.go 0.00% <0.00%> (ø)
src/pkg/utils/trustedroot.go 51.16% <51.16%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

// Note: this is the backwards compatible behavior
// this will change in the future
// Legacy signature found
l.Warn("non-bundle format signature is being deprecated in favor of the sigstore bundle format")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the intent to deprecate the standard signature file at some point in the future. Allowing backwards compatibility while shifting all new package creations to using the bundle format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Support for cosign bundle format docs: clarify asymmetric KMS key needed for signing

2 participants