Package signing
Download only from the GitHub releases page. If a check fails, do not install the package.
| Package | Check | Section |
|---|---|---|
| Flathub | Signed by Flathub, nothing to do | Flatpak |
| GitHub Flatpak bundle | SHA256SUMS |
Flatpak |
.deb pair |
GPG (dpkg-sig) + build provenance |
Debian |
Helper .rpm |
Detached GPG + RPM signature + build provenance | Fedora |
| AppImage | Embedded GPG signature | AppImage |
All GPG checks pin the ClamUI signing key fingerprint:
037273A518BE90BA6EA27B3CDEF2A3E473DE1E26Quick check: build provenance
Section titled “Quick check: build provenance”Release .deb and .rpm assets carry GitHub artifact attestations. They prove the file was built by this repository’s workflow. Needs GitHub CLI 2.49 or newer:
gh attestation verify clamui_0.6.1_amd64.deb --repo linx-systems/clamuigh attestation verify clamui-privileged-helper-0.6.1-1.x86_64.rpm --repo linx-systems/clamuiThis complements the GPG checks below; it does not replace them.
Flathub and GitHub Flatpak bundles
Section titled “Flathub and GitHub Flatpak bundles”Flathub signs every Flatpak it publishes, so installing from Flathub needs no extra step. The GitHub bundles clamui-x86_64.flatpak and clamui-aarch64.flatpak are not covered by that signature. Check them against the release’s SHA256SUMS:
sha256sum --ignore-missing -c SHA256SUMSDebian packages
Section titled “Debian packages”The release is an architecture-specific application and helper pair. Verify both:
DEB_ARCH="$(dpkg --print-architecture)"APP="clamui_0.6.1_${DEB_ARCH}.deb"HELPER="clamui-privileged-helper_0.6.1_${DEB_ARCH}.deb"test -f "$APP" && test -f "$HELPER"curl -fsSLo signing-key.asc https://raw.githubusercontent.com/linx-systems/clamui/master/signing-key.ascEXPECTED_FINGERPRINT=037273A518BE90BA6EA27B3CDEF2A3E473DE1E26ACTUAL_FINGERPRINT="$(gpg --show-keys --with-colons signing-key.asc | awk -F: '$1 == "fpr" { print $10; exit }')"test "$ACTUAL_FINGERPRINT" = "$EXPECTED_FINGERPRINT" || { echo "Unexpected ClamUI signing-key fingerprint" >&2; exit 1; }gpg --import signing-key.ascdpkg-sig --verify "$APP" "$HELPER"Success prints GOODSIG for the expected fingerprint. BADSIG means stop: install neither package. An _gpgbuilder member alone proves nothing.
Fedora RPM packages
Section titled “Fedora RPM packages”Assets: clamui-privileged-helper-0.6.1-1.x86_64.rpm and .aarch64.rpm, each with a .rpm.asc. The RPM holds only the helper, not the GUI or ClamAV. This check uses a temporary GPG home and RPM database, so your trust stores stay untouched:
set -euo pipefailVERSION=0.6.1ARCH="$(rpm --eval '%{_arch}')"case "$ARCH" in x86_64|aarch64) ;; *) echo "Unsupported ClamUI helper RPM architecture: $ARCH" >&2; exit 1 ;; esacRPM="clamui-privileged-helper-${VERSION}-1.${ARCH}.rpm"ASC="${RPM}.asc"EXPECTED_FINGERPRINT=037273A518BE90BA6EA27B3CDEF2A3E473DE1E26
test -f "$RPM" && test -f "$ASC"verify_dir="$(mktemp -d)"trap 'rm -rf "$verify_dir"' EXITdownloaded_key="$verify_dir/downloaded-signing-key.asc"PINNED_KEY="$verify_dir/clamui-pinned-key.gpg"GPG_HOME="$verify_dir/gnupg"RPMDB="$verify_dir/rpmdb"install -d -m 0700 "$GPG_HOME" "$RPMDB"curl -fsSLo "$downloaded_key" https://raw.githubusercontent.com/linx-systems/clamui/master/signing-key.ascmapfile -t PRIMARY_FINGERPRINTS < <(gpg --batch --no-options --homedir "$GPG_HOME" --show-keys --with-colons "$downloaded_key" | awk -F: '$1 == "pub" { primary = 1; next } primary && $1 == "fpr" { print $10; primary = 0 }')test "${#PRIMARY_FINGERPRINTS[@]}" -eq 1test "${PRIMARY_FINGERPRINTS[0]}" = "$EXPECTED_FINGERPRINT"
gpg --batch --no-options --homedir "$GPG_HOME" --import "$downloaded_key"gpg --batch --no-options --homedir "$GPG_HOME" --armor --export "$EXPECTED_FINGERPRINT" > "$PINNED_KEY"test -s "$PINNED_KEY"gpg_status="$(gpg --batch --no-options --homedir "$GPG_HOME" --status-fd=1 --verify "$ASC" "$RPM" 2>/dev/null)"printf '%s\n' "$gpg_status" | grep -F "[GNUPG:] VALIDSIG $EXPECTED_FINGERPRINT "
rpm --dbpath "$RPMDB" --define '_keyring rpmdb' --initdbrpm --dbpath "$RPMDB" --define '_keyring rpmdb' --define '_pkgverify_level all' --import "$PINNED_KEY"rpm --dbpath "$RPMDB" --define '_keyring rpmdb' --define '_pkgverify_level all' --checksig --verbose "$RPM"test "$(rpm --query --package --queryformat '%{NAME} %{EPOCH}:%{VERSION}-%{RELEASE}.%{ARCH}' "$RPM")" = "clamui-privileged-helper 0:${VERSION}-1.${ARCH}"Why not just rpmkeys –checksig?
The script accepts the downloaded key only if it has exactly one primary key with the pinned fingerprint, and it requires every RPM verification class. A bare rpmkeys --checksig can accept an unsigned RPM under its default policy. With set -e, any nonzero exit stops the procedure; do not parse the verbose wording, which differs between RPM versions.
Then install in the same shell, so $PINNED_KEY and $RPM are still set:
Fedora Workstation / Server. Importing the key is a lasting, system-wide trust decision. Keep localpkg_gpgcheck on:
sudo rpm --import "$PINNED_KEY"sudo dnf --setopt=localpkg_gpgcheck=1 install -y "./$RPM"Fedora Atomic. Do not import the key; layer the RPM and reboot (rpm-ostree handbook):
sudo rpm-ostree install "./$RPM"systemctl rebootAppImage
Section titled “AppImage”The asset is ClamUI-0.6.1-x86_64.AppImage with ClamUI-0.6.1-x86_64.AppImage.zsync.
-
Install build tools: a C/C++ compiler, CMake, Git,
pkg-config, GLib/GObject, Cairo, OpenSSL, GPGME, libgcrypt, zlib, FUSE headers,mksquashfs, plus GNU binutils (readelf,objcopy), GnuPG, and bubblewrap. -
Build AppImageKit’s
validatefrom a pinned revision. Upstream publishes no prebuilt binary.Terminal window git clone https://github.com/AppImage/AppImageKit.gitgit -C AppImageKit checkout 5735cc5bed206497cddfbd2a75e1982c2606c35dgit -C AppImageKit submodule update --init --depth 1cmake -S AppImageKit -B build -DUSE_SYSTEM_MKSQUASHFS=ON -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Releasecmake --build build --target validate --parallel 2 -
Run the check below. It never executes the AppImage, uses a private keyring and
/tmpinside bubblewrap, and requires the lineGood signature from. If your validator needs extra shared libraries, setVALIDATOR_LIBRARY_PATHto their directory first.
set -euo pipefailAPPIMAGE="$(realpath ClamUI-0.6.1-x86_64.AppImage)"VALIDATE="$(realpath build/src/validate)"VALIDATOR_LIBRARY_PATH="${VALIDATOR_LIBRARY_PATH:-}"EXPECTED_FINGERPRINT=037273A518BE90BA6EA27B3CDEF2A3E473DE1E26test -f "$APPIMAGE" && test -x "$VALIDATE"command -v readelf >/dev/null && command -v objcopy >/dev/nullcommand -v gpg >/dev/null && command -v bwrap >/dev/nullobjcopy --version | grep -F 'GNU objcopy' >/dev/nullreadelf -W -S "$APPIMAGE" | grep -F '.sha256_sig' >/dev/nullreadelf -W -S "$APPIMAGE" | grep -F '.sig_key' >/dev/null
WORK="$(mktemp -d)"trap 'rm -rf "$WORK"' EXITSIG_KEY="$WORK/embedded-signing-key.asc"OBJ_COPY="$WORK/objcopy-output"GNUPGHOME="$WORK/gnupg"VALIDATE_LOG="$WORK/validate.log"install -d -m 0700 "$GNUPGHOME" "$WORK/bin"BEFORE_SHA256="$(sha256sum "$APPIMAGE")"objcopy --dump-section ".sig_key=$SIG_KEY" "$APPIMAGE" "$OBJ_COPY"rm -f "$OBJ_COPY"test "$(sha256sum "$APPIMAGE")" = "$BEFORE_SHA256"test -s "$SIG_KEY"
KEY_RECORDS="$WORK/embedded-key-records"PRIMARY_FINGERPRINTS_FILE="$WORK/primary-fingerprints"gpg --batch --no-options --homedir "$GNUPGHOME" --show-keys --with-colons "$SIG_KEY" >"$KEY_RECORDS"awk -F: '$1 == "pub" { primary = 1; next } primary && $1 == "fpr" { print $10; primary = 0 }' \ "$KEY_RECORDS" >"$PRIMARY_FINGERPRINTS_FILE"mapfile -t PRIMARY_FINGERPRINTS < "$PRIMARY_FINGERPRINTS_FILE"test "${#PRIMARY_FINGERPRINTS[@]}" -eq 1test "${PRIMARY_FINGERPRINTS[0]}" = "$EXPECTED_FINGERPRINT"gpg --batch --no-options --homedir "$GNUPGHOME" --import "$SIG_KEY"ln -s "$(command -v gpg)" "$WORK/bin/gpg2" # validate invokes gpg2 by name
bwrap --unshare-all --die-with-parent --new-session \ --ro-bind / / --proc /proc --dev /dev --tmpfs /tmp \ --bind "$WORK" "$WORK" --chdir "$WORK" \ --setenv GNUPGHOME "$GNUPGHOME" --setenv LC_ALL C \ --setenv PATH "$WORK/bin:/usr/bin:/bin" \ --setenv LD_LIBRARY_PATH "$VALIDATOR_LIBRARY_PATH" \ "$VALIDATE" "$APPIMAGE" >"$VALIDATE_LOG" 2>&1LC_ALL=C grep -F 'Good signature from' "$VALIDATE_LOG" >/dev/nullAn exit code of 0 or the presence of a signature section alone is not verification.
Maintainers: configure signing
Section titled “Maintainers: configure signing”Use a dedicated 4096-bit RSA key that expires after two years. Commit only the public key as signing-key.asc; store the private key and passphrase in the GitHub Actions secrets GPG_PRIVATE_KEY and GPG_PASSPHRASE.
gpg --full-generate-keygpg --armor --export-secret-keys YOUR_KEY_ID > private.keygpg --armor --export YOUR_KEY_ID > signing-key.ascRelease workflows sign on v* tag pushes and on manual runs with sign: true; normal pushes and pull requests build unsigned. Only signed assets published on a release can be used by the in-app helper installer. Rotate the key before it expires and verify a published release on a known-good machine.