Skip to content

feat(plugin): verify keyless cosign signatures on official releases - #420

Merged
scttfrdmn merged 2 commits into
mainfrom
feat/8-signed-releases
Jul 20, 2026
Merged

scttfrdmn merged 2 commits into
mainfrom
feat/8-signed-releases

Conversation

@scttfrdmn

@scttfrdmn scttfrdmn commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

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.json bundle, spawn verifies it by default via sigstore-go:

  • a Fulcio certificate whose OIDC identity is pinned to the spore-plugins release workflow (issuer = GitHub Actions, SAN regex = …/spore-plugins/.github/workflows/release.yml@refs/tags/…),
  • Rekor transparency-log inclusion, a CT-log SCT, and a trusted timestamp,
  • over the manifest bytes.

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)

  • manifest missing/mismatch → hard fail (integrity required, increment 2)
  • signature present but invalid (bad sig, wrong identity, no Rekor entry) → hard fail
  • signature asset absent → warn, not fail (window for releases that predate signing)
  • --insecure downgrades all of the above to warnings (local-dev escape)

spawn plugin inspect shows signature-verified ✓ (or manifest-verified ✓ (unsigned)).

Files

  • pkg/plugin/signature.go — verifyManifestSignature/verifySignedEntity, pinned-identity constants, network-free trustedRootFetcher hook, requireSCT test gate.
  • pkg/plugin/registry.go — verifyManifest→verifyRelease (manifest and signature), fetchReleaseAsset, errAssetNotFound, softFail; Provenance.SignatureVerified; WithInsecure resolver option.
  • cmd — --insecure on install/inspect; status lines.

Dependency cost

Adds sigstore-go for 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, ManifestVerified set, SignatureVerified not) and --insecure downgrade.

Real-sigstore smoke ✅

Signed the real rstudio-server-v1.0.1 manifest 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.

…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

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.67257% with 58 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/plugin/signature.go 35.89% 22 Missing and 3 partials ⚠️
pkg/plugin/registry.go 58.18% 22 Missing and 1 partial ⚠️
cmd/plugin.go 57.14% 6 Missing ⚠️
cmd/plugin_inspect.go 20.00% 2 Missing and 2 partials ⚠️

📢 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.
@scttfrdmn
scttfrdmn merged commit 76e58b0 into main Jul 20, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the feat/8-signed-releases branch July 20, 2026 20:13
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