Skip to content

fix(iso): accept only Colony-signed packages into the offline repository - #8

Merged
MotherSphere merged 1 commit into
mainfrom
fix/offline-repo-signer-check
Oct 12, 2026
Merged

MotherSphere merged 1 commit into
mainfrom
fix/offline-repo-signer-check

Conversation

@MotherSphere

Copy link
Copy Markdown
Member

Follow-up to #6, from its review.

  • iso/offline-repo.sh: the pre-copy check used gpg --verify, which accepts a signature from any key in the builder's default keyring. It now resolves the fingerprint of COLONY_SIGNING_KEY and requires the VALIDSIG status line to name it (its last field is the primary key, so a subkey signature still matches). A package signed by another local key now stops the image build, not an install that has already partitioned the disk. The installer's SigLevel = Required against colony-keyring still refuses it too.
  • tools/test-repo.sh: the offline-repository case only proved that an unsigned database is refused. It now also serves the stand-in package without its .sig under a database the Colony key signs, and expects the installer's offline pacman.conf to refuse it. A control installs the same files through the same configuration with PackageOptional, so the refusal can only come from the package signature. The cached copy and signature from earlier cases are removed first so they cannot stand in for what is served.

The signer check was exercised locally with two throwaway keys: a package signed by the named key passes, one signed by another key in the same keyring, a tampered one and a missing one are refused. CI runs the new test-repo.sh case.

offline-repo.sh verified each package with gpg --verify, which accepts a
signature from any key in the builder's keyring. It now checks that the
signer is the key COLONY_SIGNING_KEY names, so a package signed by another
local key stops the image build instead of an install that has already
partitioned the disk.

test-repo.sh now also proves that the installer's offline pacman.conf
refuses a package whose own signature is missing, with a control that
installs the same files once package signatures are optional.
@MotherSphere
MotherSphere merged commit b90f454 into main Oct 12, 2026
6 checks passed
@MotherSphere
MotherSphere deleted the fix/offline-repo-signer-check branch October 12, 2026 17:15
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