fix(plugin): clear error on cosign legacy-bundle signatures#421
Merged
Conversation
…ugins#8)
A cosign bundle written without --new-bundle-format uses the legacy shape
({base64Signature,cert,rekorBundle}), which sigstore-go can't parse — it failed
with a cryptic 'proto: unknown field base64Signature'. Detect that shape up
front and return an actionable error pointing at --new-bundle-format.
Found during the real-workflow signing smoke: the virtual-Sigstore unit tests
use protobuf entities, so they never exercised the legacy-bundle path. The
registry release workflow is being fixed to emit the new format (spore-plugins);
this makes spawn fail clearly if a legacy bundle ever reaches it.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
scttfrdmn
added a commit
that referenced
this pull request
Jul 20, 2026
…re-plugins#8) (#422) Increment 4 of the registry supply-chain RFC. A successful plugin install now records its resolved provenance in two places on the instance (beyond the existing controller-side local record), so an audit can answer 'which plugin bytes are on this box, and how were they verified' from both the AWS control plane and the instance itself: - EC2 tag: spore:plugin:<name> = version + content-digest/commit prefixes + verification tier (signature/manifest/none). Compact, well under EC2's 256-char limit. Written via UpdateInstanceTags after a successful install. - spored state: Provenance threaded through the install request → InstallWithProvenance → persisted in PluginState. 'spawn plugin status' shows a Source: line. Both writes are best-effort — a tagging/state failure never fails an already-completed install. InstallWithPushed now delegates to the new InstallWithProvenance (nil prov = today's behavior); the install request gained an optional provenance field (older controllers omit it). Also documents the already-shipped legacy-bundle error fix (#421) in the CHANGELOG. Tests: provenance persisted to state; tag-value builder (all tiers, length bound).
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.
Follow-up to increment 3 (spore-plugins#8).
spawn's signature verifier usessigstore-go, which parses only the Sigstore protobuf bundle. A cosign legacy bundle ({base64Signature,cert,rekorBundle}, whatcosign sign-blob --bundlewrites without--new-bundle-format) failed with a crypticproto: unknown field "base64Signature". This detects that shape up front and returns an actionable error pointing at--new-bundle-format.Why it wasn't caught earlier
The hermetic tests use
testing/ca.NewVirtualSigstore, which produces protobuf entities — so the legacy-bundle path was never exercised. Surfaced when re-cutting the first official release through the real workflow (see the companion registry fix spore-host/spore-plugins#14, which makes the workflow emit the new format).Adds
TestVerifyManifestSignature_RejectsLegacyBundle. This is defense-in-depth: the real fix is workflow-side (#14 emits the correct format); this makes spawn fail clearly rather than cryptically if a legacy bundle ever reaches it.Refs #8. (Ships in the next spawn release; v0.86.0 already shipped with the cryptic-error version — not a regression, just a worse message.)