Repository navigation
Only accept OS updates signed by this project's key - #120
Merged
Merged
Conversation
Updates were trusted only because they came from ghcr.io over TLS, which depends on every certificate authority the system trusts. The publish step now has Podman sign each image with the COSIGN_PRIVATE_KEY secret, and a cosign check fails the build if that key doesn't match the public key shipped in the image. Installed systems require that signature for ghcr.io/tb516/os before bootc accepts an update. Other images are unaffected. The policy replaces containers-common's copy, so the config element now stages after it.
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.
Your machine trusts an OS update only because it came from ghcr.io over TLS. That depends on every certificate authority the system trusts, and the eMudhra compromise showed how one bad authority can undermine it. A network attacker with a mis-issued certificate, or anyone who tampers with the registry, could serve a fake update.
The existing publish step now has Podman sign each image as it pushes, using the
COSIGN_PRIVATE_KEYsecret. A cosign check then fails the build if that key doesn't match the public key shipped in the image. Installed systems require that signature forghcr.io/tb516/osbefore bootc accepts an update. Rebasing to other images, such as Bluefin or Dakota, still works as before.Our
policy.jsonreplaces the copy from freedesktop-sdk'scontainers-common, so the config element now depends on that package and is allowed to replace that one file. If signing fails, the build fails, and installed systems keep their current image.docs/automation.mdcovers recovery and key rotation.Tested:
ghcr.io/tb516/os:latest, rejected an unsigned image from a local registry, and accepted one signed with a test key.bootc container lint. Inside it, the policy rejects unsignedghcr.io/tb516/osand still accepts other images.Signing first runs on GitHub's runner in the
mainbuild after merging. That build still installs on your current system, which accepts any image; updates after that must be signed.