Repository navigation
feat(plugin): verify keyless cosign signatures on official releases - #420
Merged
Merged
Conversation
…spore-plugins#8) Increment 3 of the registry supply-chain RFC. When an official plugin release carries a manifest.json.sigstore.json bundle, spawn verifies it by default via sigstore-go: a Fulcio cert whose OIDC identity is pinned to the spore-plugins release workflow (issuer + SAN regex), Rekor transparency-log inclusion, an SCT, and a trusted timestamp, over the manifest bytes. Strictness (RFC decision #3, verify-by-default + deprecation window): - manifest missing/mismatch → hard fail (integrity required) - signature present but invalid → hard fail (forgery must never pass) - signature asset absent → warn, not fail (window for pre-signing releases) --insecure downgrades all of the above to warnings (dev escape). - pkg/plugin/signature.go: verifyManifestSignature + verifySignedEntity, pinned identity constants, network-free trustedRootFetcher hook, requireSCT test gate. - pkg/plugin/registry.go: verifyManifest→verifyRelease (manifest + signature), fetchReleaseAsset, errAssetNotFound, softFail; Provenance.SignatureVerified; WithInsecure resolver option. - cmd: --insecure on install/inspect; install prints verification status; inspect shows signature-verified/manifest-verified(unsigned). Adds sigstore-go (~+10M binary, 82M→92M) for offline keyless verification. Tests use a virtual Sigstore — fully hermetic, no network.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The sigstore-go dependency added to the root module bumped shared transitive aws-sdk-go-v2 versions; the nested lambda submodules (own go.mod + replace ../..) need re-tidying or govulncheck fails 'updates to go.mod needed' (the known nested-module gotcha). No code change.
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.
Increment 3 (final integrity increment) of the registry supply-chain RFC (spore-plugins#8).
What
When an official plugin release carries a
manifest.json.sigstore.jsonbundle,spawnverifies it by default viasigstore-go:…/spore-plugins/.github/workflows/release.yml@refs/tags/…),So only a manifest signed by that exact workflow in that exact repo is trusted — a valid Sigstore signature from any other identity is rejected.
Strictness (RFC decision #3 — verify-by-default + deprecation window)
--insecuredowngrades all of the above to warnings (local-dev escape)spawn plugin inspectshowssignature-verified ✓(ormanifest-verified ✓ (unsigned)).Files
pkg/plugin/signature.go—verifyManifestSignature/verifySignedEntity, pinned-identity constants, network-freetrustedRootFetcherhook,requireSCTtest gate.pkg/plugin/registry.go—verifyManifest→verifyRelease(manifest and signature),fetchReleaseAsset,errAssetNotFound,softFail;Provenance.SignatureVerified;WithInsecureresolver option.cmd—--insecureon install/inspect; status lines.Dependency cost
Adds
sigstore-gofor offline keyless verification: ~35 modules, binary 82M→92M (+10M).govulncheck(v1.3.0): 0 reachable vulns. This cost was surfaced and the direction (full sigstore-go keyless) was explicitly confirmed.Tests
Hermetic via a virtual Sigstore (
testing/ca): valid+matching-identity passes; wrong-repo, wrong-issuer, and tampered-artifact all rejected. Plus resolver tests for the deprecation-window (unsigned→warn,ManifestVerifiedset,SignatureVerifiednot) and--insecuredowngrade.Real-sigstore smoke ✅
Signed the real
rstudio-server-v1.0.1manifest with cosign keyless (real Fulcio+Rekor), temporarily pointed the identity pin at that signer, and verified against the production sigstore trust root:signature-verified ✓(full chain: Fulcio + identity + Rekor + SCT + timestamp). Restoring the production workflow pin correctly rejected the human-signed bundle ("expected SAN … got [email protected]"). The pin was reverted before commit (HEAD has the production identity); the smoke signature was removed from the public release.Companion registry PR (cosign signing in the release workflow): spore-host/spore-plugins#13.
Refs #8. Part of the batch to release increments 1+2+3 together.