custosd
binary inside it. CI signs the manifest with an Ed25519 key. Hosts only install a release whose
manifest verifies against a public key compiled into custosd, so this key, not the control plane
or the release host, decides what runs as root across the fleet.
One-time setup
-
Generate the key on a trusted machine:
It prints
CUSTOS_RELEASE_SIGNING_KEY=...(private) andpublic key: .... -
Store the private key as a secret named
CUSTOS_RELEASE_SIGNING_KEYin theprodGitHub Actions environment. Do not keep other copies; if it is lost, rotate (below). -
Trust the public key by adding it to
internal/release/keys.go: -
Release as usual. The workflow fails if the secret is missing or its key is not in
TrustedKeys, so a release the fleet would reject is never published.
Security floor
SECURITY_FLOOR at the repo root holds the floor for the next release. Raise it, in the same
change as the fix, when a release fixes a vulnerability that downgrades must not reintroduce:
Rotating the key
- Generate a new key and add its public key to
TrustedKeysalongside the old one. - Release with the old key still in the secret, and roll it out to the fleet.
- Replace the secret with the new key.
- Once every host runs a release that trusts the new key, remove the old public key and release.
If the private key leaks
Anyone holding it can sign a release that hosts will install as root once the control plane pushes it, or that a host’scustos user stages.
- Generate a new key and make its public key the only entry in
TrustedKeys. - Raise
SECURITY_FLOORto the version of this emergency release. - Release it signed with the old key, which is the only one hosts trust yet: set the
prodenvironment variableCUSTOS_RELEASE_RETIRING_KEY=trueso CI accepts a signing key that is no longer inTrustedKeys. Upgrade the fleet. Once a host installs it, old-key signatures and every older release are refused. - Replace the secret with the new key and delete
CUSTOS_RELEASE_RETIRING_KEY. - Audit hosts for binaries installed outside your releases:
custosd status, and compare/usr/local/bin/custosdwith the published digests.