Skip to content

scripts/deploy-spored.sh would break spored install for every new instance #876

Closed

Description

@scttfrdmn

Found while preparing a spored deploy for the DNS-lease change (#875). I did not run it.

What it does

scripts/deploy-spored.sh copies bin/spored-linux-amd64 and bin/spored-linux-arm64 to s3://spawn-binaries-<region>/spawn/ (plus versions/<v>/). Nothing else — no .sha256, no .sig.

Why that is an outage, not a missing nicety

The installer every spore runs at boot (pkg/sporedinstall/install.go) is fail-closed by design:

No checksum published at ${chosen}/${binary}.sha256 — refusing to install an unverified spored
Signature not found at ${chosen}/${binary}.sig — refusing to run an unsigned binary

The bucket today holds a signed set from the release workflow (2026-10-10 19:21):

spored-linux-amd64        67764386
spored-linux-amd64.sha256       65
spored-linux-amd64.sig          97
… (arm64, windows-amd64.exe likewise)

Running the script replaces the binaries and leaves the old .sha256/.sig beside them. The checksum no longer matches, so every instance launched afterwards in those regions refuses to install spored and boots with no in-instance lifecycle at all — no TTL, no idle stop, no cost-limit enforcement. The out-of-band reaper backstops only the accounts it covers, so in an uncovered account those spores never die. That is the "everything dies eventually" invariant broken by a deploy script, and release.yaml already records the same failure mode once: "hard-failing spored install region-wide (#440)."

Also stale in two smaller ways

  • 10 regions vs the release's 11 — it omits ca-central-1, so even a correct upload would leave one region on a different spored.
  • No Windows binary, while the release publishes spored-windows-amd64.exe (+ .sha256, .sig).

The supported path already exists

Tagging vX.Y.Z runs .github/workflows/release.yaml, which builds with GoReleaser, writes .sha256, signs each binary with the KMS ECDSA key via OIDC (the private key never leaves KMS), and uploads all three platforms to all 11 regional buckets. That is the only path that produces something the installer will accept.

Fix

  • Delete scripts/deploy-spored.sh, or reduce it to a hard error pointing at the release workflow. It cannot be made safe without KMS signing, which deliberately lives behind the workflow's OIDC role.
  • Gate it: no script may aws s3 cp a spored-* object without also writing its .sha256 and .sig in the same script. Mechanical to check in scripts/deploy_scripts_test.go.
  • CLAUDE.md/docs: say plainly that spored ships only by release.

Activity

  1. added
    bug
    on Oct 12, 2026
  2. added a commit that references this issue on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions