Repository navigation
Description
What's the problem
A release-asset .deb gives install but no apt upgrade. A feed needs a signing key; a leaked or CI-held key lets an attacker ship root postinst code to every user. Custody was decided on 2026-11-20 (a CI secret, offline backups, pinned fingerprint, as in node-manager) and the feed must change only on a published stable release.
What it impacts
Trust in every apt install and upgrade, SECURITY.md, the release workflow and Pages settings.
How I found it
#731 acceptance criteria, the pithead#3459 rulings of 2026-11-01 (since superseded), SECURITY.md lines 123-138 (signing removed), and release.yml, which has no signing step.
How important is it
High for the apt channel and security-sensitive: the custody decision is ruled (owner, 2026-11-20). Remaining owner actions before the first publish: generate the key, add the secret and variable, store the passphrase-protected offline backups, create the protected environment with the owner as required approver, enable Pages with the Actions source, and add a tag ruleset.
Acceptance criteria
- scripts/build-apt.sh builds a flat feed (Packages, Release, InRelease, Release.gpg) with apt-ftparchive and verifies it with
apt-get updateandapt-get downloadfrom a file:// source before publishing. - The feed is signed in the release workflow with the key stored as the repository secret APT_SIGNING_KEY, imported into a throwaway GNUPGHOME and removed on exit; the job is skipped when APT_SIGNING_FINGERPRINT is unset; build-apt.sh refuses unless the variable is a full 40-hex fingerprint and the matching secret key is present; the publish job verifies InRelease and Release.gpg with
gpg --verifyagainst the fingerprint committed in the repo (taken from main), and fails closed on a bad or missing signature. - The job that imports the key and signs (or publishes) runs in a protected GitHub environment that requires the owner's approval before anything is signed; the secret APT_SIGNING_KEY is scoped to that environment, and a run without approval signs nothing.
- The release tag must equal v$(VERSION) and be an ancestor of main; a tag ruleset protects release tags (documented as an owner step).
- Passphrase-protected backups of the private key exist on the owner's machine and on the NAS; docs state this and a rotation and recovery procedure without any host or path.
- The fingerprint is committed as a file plus README and SECURITY.md, and README shows the keyring install under /etc/apt/keyrings with a Deb822 signed-by source, and fingerprint-check commands.
- It runs only on a published stable release (never tag push, draft or prerelease), uploads the .deb and SHA256SUMS to that release, and deploys to Pages as a versioned directory behind a pointer so the previous feed can be restored (the rollback pointer is the rollback aid; node-manager has none, so it is an optional extra, not a requirement).
- A tampered Release file is rejected by apt in a test.
Possible solutions
apt-ftparchive plus gpg on Pages. reprepro or aptly add state for one package. Ruled (owner, 2026-11-20): sign in the release workflow with the repository secret, behind a protected environment with owner approval (node-manager's implemented model, also adopted for pithead). Signing at cut time on a release host with the key never in CI is rejected.
Activity
pithead-developer commentedon Nov 22, 2026
Merged in #795.