Skip to content

Verify signed release checksums before self-updates - #48

Open
compnew2006 wants to merge 2 commits into
UserJoo9:mainfrom
compnew2006:codex/sign-release-updates
Open

compnew2006 wants to merge 2 commits into
UserJoo9:mainfrom
compnew2006:codex/sign-release-updates

Conversation

@compnew2006

@compnew2006 compnew2006 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem and impact

The in-app updater downloaded GitHub Release assets and handed them to the system installer without authenticating the package bytes. HTTPS protects the connection in transit, while control of the release assets could still affect the privileged installation path.

Solution

  • Publish SHA256SUMS for the four release package formats and a detached OpenPGP signature, SHA256SUMS.sig. Reuse the existing signing secret, verify against the repository's public keyring before publishing, and fail the release job if signing or self-verification fails.
  • Share one verification path between manual and automatic updates. Verify the manifest with the public keyring from the installed application, bind the digest to the exact versioned filename, and compare the downloaded package's SHA-256 in a private staging directory before extraction or installation.
  • Ship the public keyring and the platform's gpgv dependency with the installers. Reject missing or invalid metadata, an untrusted signature, and a package that does not match its signed checksum.

User and release impact

Authorized updates continue through the dashboard and auto-update paths. A release that cannot be authenticated is refused before the package manager or tarball installer runs. The protection takes effect after installing a build containing this change through the signed APT repository or another trusted install path. The first signed release requires the existing APT_REPO_GPG_KEY secret to match quota-manager.gpg.

Verification

  • Linux CI passed lint and all 1,075 tests on Python 3.12.
  • Packaging smoke tests passed the package build and install/upgrade/remove checks on Debian, Ubuntu, Fedora, and Arch, including presence of the packaged keyring and verifier.
  • 76 updater, admin API, packaging, and workflow tests passed locally on Python 3.12. Real GnuPG tests with disposable keys checked publication of checksums for all four formats and confirmed that the updater rejects missing signatures, invalid signatures, untrusted signers, modified manifests, and modified payloads before the installer. A valid signed fixture reaches the installer stub. The authenticated admin endpoint exercises both rejection and successful installation with the same signed fixture.
  • pyflakes api core quota tests run.py, Bash syntax checks for changed scripts, and git diff --check passed.
  • The release signing step was exercised with disposable keys. Publishing and signing a production release are part of the normal release process after merge.

Local macOS full-suite note: four tests reported failures or timeouts in one run. The four passed when rerun in isolation on both the PR branch and its base: test_stop_new_falls_back_to_registered_block_when_fragment_unwritable, test_per_device_admin_block_reaches_the_kernel, test_check_failure_preserves_last_known, and test_maybe_check_gated_by_interval_and_enabled.

This branch has not been deployed

No deployments
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