Repository navigation
Plugin push: encrypt calls that travel over SSM - #1604
Merged
Merged
Conversation
Contributor
Author
|
Live check before merge (owner; spore-host-dev, TTL on every launch, leak-check after)
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
Author
|
Live check passed (spore-host-dev us-east-1, 2026-11-12, t3.small). Inbound SSH was blocked with a temporary no-ingress SG and the local SSH control master closed, so the push really went over SSM.
Teardown: the instance is terminated, and the temporary SG and scratch bucket are deleted. An independent leak check found nothing left. |
Over SSM a push-API call's text and output are kept in SSM command history. spored now hands out single-use HPKE keys (ML-KEM-768+X25519) at /v1/seal-key and serves sealed calls at /v1/sealed; spawn seals the request and a per-call reply key to it, so the history holds only public keys and ciphertext. A spored without the endpoint is refused over SSM rather than sent clear text.
scttfrdmn
force-pushed
the
fix/sec-plugin-push-sealed
branch
from
November 12, 2026 19:46
00fe277 to
a687ac6
Compare
scttfrdmn
marked this pull request as ready for review
November 12, 2026 19:46
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.
Encrypts plugin push-API calls that go over SSM.
When
spawn plugin install|status|list|remove|pushcan't use SSH (no public IP, keyless, or SSH failing), it runs the loopback call on the instance over SSM SendCommand (#855). SSM command history keeps that text and its output. Over SSM, each call now travels sealed both ways.Design (
pkg/pushseal)GET /v1/seal-key: spored generates a single-use HPKE keypair (ML-KEM-768 + X25519, HKDF-SHA256, AES-256-GCM). It keeps the private half in memory and returns the public half.{method, path, body, reply_key}to that key, using a reply keypair generated for this one call, and sends it toPOST /v1/sealed.SSM's history ends up holding only public keys and ciphertext. Both private keys exist only in memory for the length of one call, so nothing recorded can be opened later. The sealed endpoints sit behind the existing bearer-token middleware. A sealed request may only name a
/v1/push-API route: nesting, absolute URLs and other methods are refused./v1/seal-key, so a 404): spawn refuses the SSM path with a message to runspawn upgrade-spored <id>or use SSH. It never falls back to sending in clear.Deploy checklist impact
spawn upgrade-sporedbefore they accept plugin calls over SSM. Needs the owner's live check before merge (steps are in the PR comment).Tests
pkg/pushseal: round trip, no plaintext on the wire, single-use and expiry, key cap, tamper rejection, inner-route allow-list.pkg/pluginruntime: a sealed status call through the real push API with auth.cmd: the existing SSM sandbox tests run the real SendCommand scripts undersh/curlagainst a sealing spored. They now also assert that neither the pushed secret, the config nor the spec appear in any script, any output, or anything the staged base64 decodes to. A status answer carrying a password stays out of the record too. An older spored is refused with nothing sent. A deliberate revert to clear-text SSM makes these gates fail.make checkis green.semgrep scan --config=auto --erroron the changed paths is clean.