Repository navigation
Bind spored to name and version; verify Windows and DCV installers (#1597, #1598) - #1619
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Nov 13, 2026
…1597, #1598) the same bucket, so any signed spored, of any version or architecture, verified at any release's path. Each release now also KMS-signs a manifest (name, version, sha256) as <name>.msig; the Linux and Windows installers rebuild it from what they asked for and what they downloaded and refuse a missing or non-verifying one, for releases from ManifestFloor (0.165.0) on. The bootstrap budget grows by 160 gzipped bytes, in review. Linux bootstrap pins, latest as fallback) and the SSM agent setup only after Get-AuthenticodeSignature is Valid with an Amazon signer. The DCV install fails closed: the key import, every RPM's rpm -K and dnf's localpkg_gpgcheck must pass, or nothing is installed.
scttfrdmn
marked this pull request as ready for review
November 14, 2026 00:19
scttfrdmn
force-pushed
the
fix/1597-1598-artifact-integrity
branch
from
November 14, 2026 00:19
d11b75d to
6b5652f
Compare
Merged
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.
Fixes #1597
Fixes #1598
Both issues are about artifact integrity: what the bootstraps install as root/SYSTEM must be exactly what spore.host or Amazon published, and nothing else.
#1597: spored bound to its name and version
Each spored's
.sigcovers its bytes alone, and the.sha256sits in the same bucket. So any spored ever signed, of any version or architecture, verified at any release's path.release.yaml). For each spored, the release writesManifestText=spored-manifest-v1\nname=<name>\nversion=<v>\nsha256=<hex>\nand KMS-signs its digest as<name>.msig. It then verifies that signature against the key compiled into spawn, publishes it with the others, reads it back, and copies it tocurrent/.VerifiedInstallFunc). WhenSPORED_MANIFEST_VERSIONis set, the installer rebuilds the manifest withprintffrom the binary name, that version and the sha256 it just computed, then verifies.msigwithopenssl. A missing.msigor a failed verify refuses the install.PinScriptForsets the variable only for releases ≥ManifestFloor.Assert-SporeSignatureover the manifest's SHA-256).ManifestFloor = 0.165.0. This is the first release that will publish.msig. Older releases have none and are still held to.sigalone.TestManifestFloorIsNotAnExistingReleasefails if a tag at or past the floor was released without.msig. If this ships in a release other than 0.165.0, adjust the floor.minify_test.gohas the reasoning). It lands in the published body; a release stub gains one variable.#1598: Windows installers and DCV
Assert-SpawnAmazonSignedfunction (pkg/sporedinstall/authenticode.go) requiresGet-AuthenticodeSignatureStatusValidand a signer subjectO=Amazon…, or it throws. Every downloaded installer passes it before it runs:AWSCLIV2-<the Linux pin's version>.msi, falling back toAWSCLIV2.msi; both are signature-checked.scripts/install-spored.ps1, which was regenerated.dcvInstallBlock).rpm --importfailing now installs nothing; it used to be|| true.digests signatures OKunderrpm -K. No RPMs, or any other line, also installs nothing.--setopt=localpkg_gpgcheck=1.Not done here: sha256 pins for the DCV tarball, the MSI and the SSM agent setup. Computing them means fetching the artifacts from AWS origins, which this work was not allowed to do. The signature checks above fail closed in their place, and I filed #1620 to add the hashes through the pin workflow.
Tests and gates
TestAVersionedInstallRequiresTheManifestSignaturecovers a missing.msig, another version (replay), another binary (arch swap), other bytes, and the valid case. I watched all four negatives fail with the requirement disabled.TestAVersionBeforeTheFloorNeedsNoManifestSignature.TestWindowsVersionedInstallRequiresTheManifestSignature, run in pwsh.TestManifestTextIsWhatEveryWriterWritesholds bash printf, the PowerShell and therelease.yamlprintf to one text.TestReleasePublishesTheSignedVersionedSporedruns the release step and verifies.msig.TestWindowsUserDataRunsOnlyAmazonSignedInstallersandTestWindowsStandaloneRunsOnlyAmazonSignedInstallersdiscover every downloaded-and-run installer. I watched them fail with the SSM agent check removed.TestAssertSpawnAmazonSignedOnWindowsruns on the Windows CI runner: an unsigned file and notepad.exe are refused, and the runner's Amazon-signedaws.exeis accepted.TestDCVInstallsOnlyVerifiedPackagesruns the block with stubbed rpm/dnf. I watched it fail with the import check bypassed.There is no IAM change, so no
sporedPolicySchemabump. User data, the bootstrap body and the release workflow all change.Live checks needed before merge (owner)
Run in 435415984226, with
--ttl 30m..msigis the release itself. Before tagging, run the "Publish the versioned spored" step on a scratch tag, or read the step's own self-verify output on the release run. Then confirm:aws s3 ls s3://spawn-binaries-us-east-1/spawn/versions/<v>/ --region us-east-1lists*.msigfor all three binaries.openssl dgst -sha256 -verifyof the manifest passes.spawn launch --ttl 30mshould logSignature verifiedand the instance should heartbeat. Negative: in a scratch bucket path, a stale.msigmust make the install retire the instance with#1597.spawn launch --os windows --ttl 30m. The console output (aws ec2 get-console-output --region us-east-1) shows nospawn: refusing, and spored runs.AmazonSSMAgentSetup.exe.C:\Program Files\Amazon\AWSCLIV2\aws.exeexists afterwards, which confirms the MSI signer.spawn app launch <a DCV app> --ttl 30mshould install DCV, start the session, and print nofailed signature verification.