Skip to content

fix(release): sign spored digest, not raw binary (KMS 200KB cap) - #429

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/440-kms-digest-signing
Jul 21, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/440-kms-digest-signing

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

The v0.91.0 release failed at the new signing step: aws kms sign rejects a request body over ~200KB (HTTP content length exceeded 200000 bytes), but the spored binary is ~80MB.

Fix: compute the SHA-256 digest (32 bytes) and sign with --message-type DIGEST instead of RAW. ECDSA signs the digest either way, so the signature still verifies with the bootstrap's openssl dgst -sha256 -verify (which hashes the file, then checks) — no bootstrap change needed.

Validated against the real KMS key (alias/spored-signing): a DIGEST-mode signature of a 5MB blob verifies with openssl dgst -sha256 -verify, and a tampered file is rejected. Refs #440. Needed before re-cutting the release.

…440)

The v0.91.0 release failed: 'aws kms sign' rejects messages over ~200KB, but
spored is ~80MB. Fix: compute the SHA-256 digest (32 bytes) and sign with
--message-type DIGEST. ECDSA signs the digest regardless, so the signature still
verifies with the bootstrap's 'openssl dgst -sha256 -verify' unchanged (it hashes
the file then checks the digest). Validated against the real KMS key: DIGEST-mode
sig of a 5MB blob verifies with openssl dgst; no bootstrap change needed.
@scttfrdmn
scttfrdmn merged commit fe61ef7 into main Jul 21, 2026
6 checks passed
@scttfrdmn
scttfrdmn deleted the fix/440-kms-digest-signing branch July 21, 2026 19:23
scttfrdmn added a commit that referenced this pull request Jul 22, 2026
Fourth external-review polish: surface the safety model in the CLI, not just
the docs. `spawn status` on a running managed instance now appends:

  Lifecycle protection:
    In-instance (spored):  enforces TTL + idle rules on the instance itself
    Out-of-band reaper:    backstop in the spore.host-infra account, if deployed
    Termination deadline:  2026-07-22 18:00 PDT (in 2h 55m)
    Max compute cost:      ~$4.82 by deadline (on-demand rate, compute only; ...)
    Idle timeout:          30m (stops the instance when idle; never terminates)

Computed controller-side from tags: deadline from the launch-anchored
spawn:ttl-deadline tag (falls back to launch+TTL), max cost from
LookupEC2OnDemandPrice x hours-to-deadline. Honest about the reaper — it is
NOT authoritatively visible from the launch account (pkg/doctor ReaperConfigured
says the same), so it is described as a backstop 'if deployed' rather than
claiming dual enforcement. Shown for both the SSH and SSM status paths; only for
running/pending managed instances. Unit-tested (block presence, gating,
deadline resolution).
scttfrdmn added a commit that referenced this pull request Jul 22, 2026
Fourth external-review polish: surface the safety model in the CLI, not just
the docs. `spawn status` on a running managed instance now appends:

  Lifecycle protection:
    In-instance (spored):  enforces TTL + idle rules on the instance itself
    Out-of-band reaper:    backstop in the spore.host-infra account, if deployed
    Termination deadline:  2026-07-22 18:00 PDT (in 2h 55m)
    Max compute cost:      ~$4.82 by deadline (on-demand rate, compute only; ...)
    Idle timeout:          30m (stops the instance when idle; never terminates)

Computed controller-side from tags: deadline from the launch-anchored
spawn:ttl-deadline tag (falls back to launch+TTL), max cost from
LookupEC2OnDemandPrice x hours-to-deadline. Honest about the reaper — it is
NOT authoritatively visible from the launch account (pkg/doctor ReaperConfigured
says the same), so it is described as a backstop 'if deployed' rather than
claiming dual enforcement. Shown for both the SSH and SSM status paths; only for
running/pending managed instances. Unit-tested (block presence, gating,
deadline resolution).
scttfrdmn added a commit that referenced this pull request Jul 22, 2026
#433)

* feat(status): show a Lifecycle protection summary (#429-review)

Fourth external-review polish: surface the safety model in the CLI, not just
the docs. `spawn status` on a running managed instance now appends:

  Lifecycle protection:
    In-instance (spored):  enforces TTL + idle rules on the instance itself
    Out-of-band reaper:    backstop in the spore.host-infra account, if deployed
    Termination deadline:  2026-07-22 18:00 PDT (in 2h 55m)
    Max compute cost:      ~$4.82 by deadline (on-demand rate, compute only; ...)
    Idle timeout:          30m (stops the instance when idle; never terminates)

Computed controller-side from tags: deadline from the launch-anchored
spawn:ttl-deadline tag (falls back to launch+TTL), max cost from
LookupEC2OnDemandPrice x hours-to-deadline. Honest about the reaper — it is
NOT authoritatively visible from the launch account (pkg/doctor ReaperConfigured
says the same), so it is described as a backstop 'if deployed' rather than
claiming dual enforcement. Shown for both the SSH and SSM status paths; only for
running/pending managed instances. Unit-tested (block presence, gating,
deadline resolution).

* security: sign CLI release artifacts with keyless cosign + SLSA (#430)

Signs checksums.txt with keyless cosign (Sigstore, GitHub OIDC identity) and
adds SLSA build provenance for the downloadable spawn CLI artifacts. Separate
from and complementary to spored's KMS publisher-signing + boot verification
(#440) — the spored S3-upload step is untouched.

- .goreleaser.yaml: signs: block → cosign sign-blob --bundle over checksums.txt
  (cosign 3.x bundle format). Publishes checksums.txt.bundle.
- release.yaml: install cosign, add attestations: write, add
  attest-build-provenance over checksums.txt. id-token: write already present.

Takes effect from the next tagged release. Refs #344. Closes #430
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