Skip to content

feat(plugin): record installed-plugin provenance on the instance#422

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/8-instance-provenance
Jul 20, 2026
Merged

feat(plugin): record installed-plugin provenance on the instance#422
scttfrdmn merged 1 commit into
mainfrom
feat/8-instance-provenance

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Increment 4 of the registry supply-chain RFC (spore-plugins#8, decision #5: EC2 tag + spored state).

What

A successful spawn plugin install now records the resolved provenance in two places on the instance (in addition to 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:

  1. EC2 tag spore:plugin:<name> — compact value: version=…;sha256=…;commit=…;verify=signature|manifest|none. Well under EC2's 256-char limit. Written via UpdateInstanceTags.
  2. spored state — provenance threaded through the install request → new InstallWithProvenance → persisted in PluginState.Provenance. spawn plugin status <name> shows a Source: line.

Both are recorded once the install request is accepted (the bytes are on the box and their provenance is known), independent of whether the plugin's service later reaches Running — matching spored's state, which persists on failure too. Both writes are best-effort; a failure never fails the install. InstallWithPushed now delegates to InstallWithProvenance (nil prov = today's behavior); the install request's provenance field is optional (older controllers omit it).

Tests

  • InstallWithProvenance persists provenance to state.
  • Tag-value builder across all verification tiers, with a length bound.

Real-AWS smoke ✅ (gated: TTL 30m, spore-host-dev)

Launched t3.small, hot-swapped branch spored (verified sha == local build), installed the signed official rstudio-server@v1.0.1 (signature verified (official release)):

  • EC2 tag written: spore:plugin:rstudio-server = version=v1.0.1;sha256=0bffc628dd64;commit=2dda4ab8dc6f;verify=signature
  • spawn plugin status shows Source: commit 2dda4ab8dc6f · sha256 0bffc628dd64 · signature-verified ✓
  • Both recorded even though rstudio's own start step failed (pre-existing plugin bug spore-plugins#12) — confirming provenance is captured regardless of the plugin's runtime outcome.

Instance terminated; leak-check clean; S3 staging cleaned.

Also documents the already-merged legacy-bundle error fix (#421) in the CHANGELOG.

Refs #8.

…re-plugins#8)

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).
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.66667% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/plugin.go 38.63% 27 Missing ⚠️
pkg/pluginruntime/pushapi.go 0.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 8560b5c into main Jul 20, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the feat/8-instance-provenance branch July 20, 2026 21:19
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