Hardened minimal Fedora Silverblue image that enforces a zero‑trust, immutable OS blueprint with SLSA provenance verification, SELinux + systemd lockdown, strict package controls and a declarative Flatpak vault.
This repository contains the image recipe, the system configuration injected into the immutable layer and the helper code used during the build and at runtime to enforce the Cipherblue security posture.
Table of contents
- Quick summary
- High level architecture
- Hardening features (what changes and where)
- Build, CI and secrets
- Deploying Cipherblue (rebase instructions)
- Security / limitations / contribution
- Appendix: exact file mapping (implementing files & scripts)
Quick summary
- Base: forked Silverblue image (recipe:
recipes/recipe-cipherblue.yml, base-image:quay.io/fedora/fedora-silverblue, image-version:latest). - Purpose: provide an immutable, auditable workstation appliance for focused, high-value engineering with strong platform integrity guarantees.
High level architecture
-
Build-time:
- GitHub Actions + BlueBuild assemble the image using
recipes/recipe-cipherblue.ymland a set of file and script modules. The CI injects secrets (when configured) and runs verification tooling (crane, slsa-verifier). - A local module (modules/cipherblue-signing) configures container registries and copies container signing keys to enable image verification.
- GitHub Actions + BlueBuild assemble the image using
-
Runtime enforcement:
- Multiple systemd one-shot/daemon units and helper scripts (under
files/system/usr/libexec/cipherblue/andfiles/system/usr/lib/systemd/system/) enforce immutability, reconcile kernel arguments, manage Flatpak state, audit configuration drift and verify SLSA provenance of the currently deployed OSTree image.
- Multiple systemd one-shot/daemon units and helper scripts (under
What the recipe changes vs upstream Silverblue (summary)
Cipherblue is opinionated: it reduces runtime attack surface, enforces cryptographic provenance, locks down user and system state, and converts runtime configuration to a small, auditable set of files under the immutable layer. Key changes:
- Packages added (recipe dnf installs):
hardened_malloc,openssl,patch,sbsigntools,no_rlimit_as,crane,slsa-verifier,gnome-tweaks,tlp,fscrypt,wl-clipboard. - RPM-OSTree install:
gnome-disk-utility. - Packages explicitly removed by the recipe (rpm-ostree remove):
buildah,crun,dnf5,fedora-logos,fedora-logos-httpd,libdnf5,libdnf5-cli,sdbus-cpp,yajl. - Aggressive package removal at build-time (DNF5 driven) — see
files/scripts/package-remover.shfor the exhaustive list and categories removed (desktop, multimedia, virtualization, printing, networking helpers, etc.). - Local package layering & repositories are purged from the image (see
files/scripts/cipherblue-cleanup.sh). System-level Flatpak remotes are removed and a controlled Flatpak vault is enforced.
Hardening features (detailed, mapped to implementing files)
- Image provenance and rebase / SLSA verification
- files/system/usr/libexec/cipherblue/verify-provenance.sh — verifies the running OSTree image using
slsa-verifierandcraneagainst expected source/branch; uses credentials in/etc/ostree/auth.json. - files/system/usr/libexec/cipherblue/cipher-secure-rebase.sh — secure rebase logic (rebase to a signed image when a vault/credentials are available).
- modules/cipherblue-signing/* — configures container signing (copies
/etc/pki/containers/*.pubto/usr/etc/pki/containers/and places a registry config intoregistries.d/).
- Kernel / boot hardening
- files/system/usr/lib/bootc/kargs.d/10-cipherblue.toml — declarative kernel arguments injected into OSTree (many hardening and mitigation kargs).
- cipherblue-sync/cipherblue-sync.sh and files/system/usr/libexec/cipherblue/cipher-kargs-reconciler.sh — harmonize and reconcile TOML / OSTree kargs, applying missing args atomically (systemd unit:
cipher-kargs-reconciler.service). - files/system/usr/libexec/cipherblue/cipher-grub-lockdown.sh — generates GRUB PBKDF2 hash and writes
/boot/grub2/user.cfgto lock the bootloader.
- SELinux hardening & custom policies
- files/scripts/selinux-hardening.sh — a single-transaction
setsebool -Ppass toggling a large set of SELinux booleans (many are turned off; a few turned on:deny_bluetooth,deny_ptrace,secure_mode,secure_mode_policyload). - files/scripts/installselinuxpolicies.sh and
files/scripts/selinux/*— compile and install additional SELinux modules (e.g.,flatpakfull,nautilus,systemsettings,thunar, user-namespace hardening modules).
- Systemd state & service hardening
- files/scripts/systemd-hardening.sh — disables and masks a long list of upstream services considered unnecessary or dangerous (sshd, avahi, cups, sssd, NFS daemons, etc.) and enables Cipherblue zero-trust services.
- files/system/usr/lib/systemd/system/.service & timers — cipher- units implement the enforcement agents (examples below):
files/system/usr/lib/systemd/system/cipherblue-sentinel.service+usr/libexec/cipherblue/sentinel-daemon.sh— runtime watchdog/telemetry daemon (alerts via notify-send/logger), watches for drift, service failures and SELinux state.files/system/usr/lib/systemd/system/cipher-flatpak-vault.service+usr/libexec/cipherblue/cipher-flatpak-vault.sh— reconciles system Flatpaks with the declarative vault list.files/system/usr/lib/systemd/system/cipher-flatpak-update.{service,timer}— scheduled app updates.files/system/usr/lib/systemd/system/cipher-audit-drift.{service,timer}— daily configuration drift auditor.files/system/usr/lib/systemd/system/cipher-cleanup.{service,timer}— periodic garbage collection and rpm-ostree cleanup.
- Polkit-based state mutation control
- files/system/etc/polkit-1/rules.d/00-cipherblue-appliance.rules — absolute zero-trust polkit policy. It:
- Hard denies flatpak and rpm-ostree state mutations for non-root users.
- Implements an allowlist for ordinary GNOME control-center actions, and enforces AUTH_ADMIN on sensitive actions.
- Sends telemetry via
loggerfor blocked attempts so the sentinel can notify/record events.
- Flatpak vault & software supply control
- files/scripts/cipherblue-private.sh — CI-time secret injection engine that stages a declarative Flatpak whitelist and a private vault overrides tarball into
/etc/cipherblue/. - files/system/usr/libexec/cipherblue/cipher-flatpak-vault.sh — runtime enforcer that ensures only a verified, CI-controlled Flatpak remote (
cipherblue-verified-floss) is trusted and that the system Flatpak set matches/etc/cipherblue/flatpaks.list. - files/scripts/removefedoraflatpakremoteservice.sh + cipherblue-cleanup.sh — remove Fedora/Flathub system remotes and prevent automatic re-adding.
- Filesystem & user environment immutability
- files/system/usr/libexec/cipherblue/cipher-user-env-lockdown.sh — cascading node-freeze engine: enforces a narrow whitelist under user home directories and freezes important files with
chattr +ito prevent state mutation. - files/system/usr/libexec/cipherblue/cipher-mount-enforcer.service — remounts temporary filesystems with nosuid,noexec,nodev where appropriate.
- files/system/usr/libexec/cipherblue/cipher-audit-drift.sh — compares
/usr/etcvs/etcto detect configuration drift and raises alerts.
- SUID / capability & permission hardening
- files/scripts/suid-hardening.sh & files/scripts/removesuid.sh — remove SUID/SGID bits except for a small whitelist; remove
pkexec,sudo,suwhere appropriate and add necessary capabilities to specific binaries instead of SUID. - files/scripts/permission-hardening.sh — strict umask, disable securetty, tighten internal helper scripts permissions (700) and other PAM/login defaults.
- Kernel tunables & runtime hardening (sysctl)
- files/system/etc/sysctl.d/60-cipherblue-hardening.conf — aggressive kernel runtime hardening (ptrace/yama, bpf JIT, kptr_restrict, disable IPv6 by default in many configs, disable unprivileged userns, etc.).
- files/system/usr/lib/sysctl.d/55-hardening.conf — supplemental network & kernel hardening values.
- Module blacklisting & kernel feature blocking
- files/system/etc/modprobe.d/cipherblue-blacklist.conf — blacklist of many drivers/subsystems and
install <module> /bin/falselines to prevent loading of attack-surface modules (USB networking, legacy filesystems, telemetry modules, etc.).
- Journald privacy, coredump & tmpfiles hardening
- files/system/etc/systemd/journald.conf.d/60-cipherblue-privacy.conf —
Storage=volatile, limits and rate-limiting. - files/system/etc/security/limits.d/60-disable-coredump.conf & files/system/etc/sysctl.d/* — disable core dumps and tune resource limits.
- files/system/etc/tmpfiles.d/99-cipherblue-proc.conf and
99-cipherblue-sys.conf— strict permissions for/procand/sysentries.
- Network & NetworkManager hardening
- files/system/etc/NetworkManager/conf.d/60-cipherblue.conf — disable auto DNS, cloned MACs (privacy),
dns=systemd-resolvedand disable connectivity checks (99-disable-connectivity.conf).
- Package & repo trust model
- files/scripts/cipherblue-cleanup.sh — removes all
/etc/yum.repos.d/*and/etc/pki/rpm-gpg/*to force reliance on the CI pipeline and the maintained set of signed packages. - files/scripts/package-remover.sh — removes a large set of upstream packages to reduce attack surface; see the script for the precise exhaustive list.
- files/system/etc/yum.repos.d/cipherblue-packages-fedora.repo and
repo.cipherblue.dev.cipherblue.repo— cipherblue repository configuration (signed GPG keys are underfiles/system/usr/share/pki/rpm-gpg/).
- Trivalent browser & MDM
- files/scripts/install-trivalent.sh — fetches a verified trivalent RPM, verifies provenance with
slsa-verifier, installs the browser and related SELinux policy (trivalent-selinux).
How CI, builds and secrets are used
- The production build is run in GitHub Actions using
.github/workflows/cipherblue-build.ymland.github/workflows/cipherblue-sync.yml. - Secrets consumed at build-time (set in the repository/GH Actions secrets):
CIPHERBLUE_BLOCKLIST— newline/comma separated list; staged at/etc/cipherblue/hosts.blocklistbycipherblue-private.sh.CIPHERBLUE_FLATPAKS— comma-separated list of Flatpak application IDs; staged at/etc/cipherblue/flatpaks.list.PRIVATE_VAULT_PAT— a GitHub token/PAT used to fetch a private vault tarball (over HTTPS) which contains Flatpak overrides and other private configuration;cipherblue-private.shstages overrides into/etc/cipherblue/flatpak-overrides/.
- The repository also provisions container signing config (modules/cipherblue-signing) so that runtime verification can require signature/attestation artifacts.
Deploying / Testing locally
- Quick (testing) rebase to the latest development image (unsigned/test):
rpm-ostree rebase ostree-unverified-registry:ghcr.io/sowrhoop/cipherblue:latest
systemctl reboot- Production (signed image) workflow — prefer verification and signed
ostree-image-signed:references. The runtimecipher-secure-rebase.shexpects a signed GHCR image and a populated/etc/ostree/auth.jsonfor authenticated pulls.
Notes, caveats and limitations
- Cipherblue intentionally removes many upstream convenience packages and services (SSH server, printing, many desktop extras, local package layering tools). This is by design — the image is targeted for single-tenant, high-assurance use cases and CI-managed package lifecycle.
- Removing
sudoand other userland utilities breaks workflows that expect password-based privilege escalation. Administrative tasks should be performed in the image build pipeline or via ostree-based workflows. - Some kernel and service hardenings may be aggressive on certain hardware (e.g., disabling IEEE 802.11 features, disabling some telemetry modules and filesystems). Test carefully on target hardware.
Contributing & reporting security issues
- This project is open to contributions. For general issues or PRs, please use GitHub issues/pull requests: https://github.com/sowrhoop/cipherblue
- If you discover a security issue, please open a private issue (or use the Security contact channel configured in the repository) so the maintainers can respond.
License
This project is released under the GNU Affero General Public License v3 (AGPL-3.0-or-later). See the LICENSE file for full terms.
Appendix: important files & where the enforcement lives (selected)
-
Recipe and orchestration
recipes/recipe-cipherblue.yml— image recipe used by BlueBuild/GitHub Actions.cipherblue-sync/cipherblue-sync.sh— upstream sync, rebrand and kargs harmonization engine.
-
Build / secret injection
files/scripts/cipherblue-private.sh— consumesCIPHERBLUE_BLOCKLIST,CIPHERBLUE_FLATPAKS,PRIVATE_VAULT_PAT.modules/cipherblue-signing/— signing/registry configuration copied into the image during build.
-
Runtime enforcement scripts (examples)
files/system/usr/libexec/cipherblue/sentinel-daemon.shfiles/system/usr/libexec/cipherblue/verify-provenance.shfiles/system/usr/libexec/cipherblue/cipher-secure-rebase.shfiles/system/usr/libexec/cipherblue/cipher-flatpak-vault.shfiles/system/usr/libexec/cipherblue/cipher-flatpak-update.shfiles/system/usr/libexec/cipherblue/cipher-kargs-reconciler.shfiles/system/usr/libexec/cipherblue/cipher-user-env-lockdown.sh
-
Systemd units & presets (examples)
files/system/usr/lib/systemd/system/cipherblue-sentinel.servicefiles/system/usr/lib/systemd/system/cipher-flatpak-vault.servicefiles/system/usr/lib/systemd/system/cipher-flatpak-update.servicefiles/system/usr/lib/systemd/system/cipher-flatpak-update.timerfiles/system/usr/lib/systemd/system/cipher-cleanup.{service,timer}files/system/usr/lib/systemd/system/cipher-audit-drift.{service,timer}files/system/usr/lib/systemd/system/cipher-firmware-update.{service,timer}files/system/usr/lib/systemd/system/cipher-kargs-reconciler.servicefiles/system/usr/lib/systemd/system-preset/40-cipherblue.preset
-
Key system configuration files (examples)
files/system/etc/sysctl.d/60-cipherblue-hardening.conffiles/system/usr/lib/sysctl.d/55-hardening.conffiles/system/etc/modprobe.d/cipherblue-blacklist.conffiles/system/etc/polkit-1/rules.d/00-cipherblue-appliance.rulesfiles/system/etc/dconf/db/local.d/00-cipherblue-settingsfiles/system/etc/dconf/db/local.d/locks/00-cipherblue-locksfiles/system/etc/systemd/journald.conf.d/60-cipherblue-privacy.conffiles/system/etc/systemd/logind.conf.d/99-cipherblue-tty-lockdown.conffiles/system/etc/tmpfiles.d/99-cipherblue-proc.conffiles/system/etc/tmpfiles.d/99-cipherblue-sys.conffiles/system/usr/lib/bootc/kargs.d/10-cipherblue.toml
For the exhaustive, machine-readable lists of files, packages removed/installed and the exact exclusions used by the sync engine see:
files/scripts/package-remover.sh(explicit removal categories)cipherblue-sync/cipherblue-exclude.txtandcipherblue-sync/upstream-preserve.txtcipherblue-sync/SYNC_AUDIT.md(generated by the sync job and included in CI artifacts)