Summary
I run my development laptop and my home server as one system, built to a written security
standard and managed entirely as code. The laptop is Fedora COSMIC Atomic on a Dell XPS 15. The
server is Fedora CoreOS on a Minisforum mini PC under my desk, running a self-hosted GitLab CE
instance with seven CI runners and a container registry, a Prometheus, Loki and Grafana monitoring
stack, and the services behind my own projects. The server has no open inbound port, not even SSH
on the LAN: everything arrives through an identity-aware tunnel, and every change to the machine
is a reviewed merge request that CI applies.
I would like to write this up as a multipart, expert-level series. The work is ongoing, and I
would write it that way: what is built and verified, what broke and how it was root-caused, and
what is still open. Each part stands alone, opens in plain terms for newer readers, and then goes
all the way down for experienced ones.
Why this is worth a series
- The atomic mindset beyond the desktop. An image-based OS gives you a known state, atomic
updates and rollback. The series extends that to everything around the OS: systemd units,
containers, firewall rules, DNS, access policies, repository settings and the audit itself live
in git, and drift from them is a finding. - Zero trust in practice. No trusted network, no device trusted by default, and no trusted
automation. CI jobs, scanners and the AI coding assistant I use are treated as actors that need
limits, and a human merge is the only approval. - A standard instead of a checklist. The work is measured against OWASP ASVS 5.0, the OWASP AI
Security Verification Standard and the OWASP CI/CD Top 10, tailored into a 604-row requirement
matrix (402 rows apply, 152 conditional, 50 not applicable, each with a reason). A requirement is
met when its row has evidence, not when a document says so. - Real failures as teaching material. Every part is built around problems I hit and fixed on
real hardware, and the fixes go into the system rather than into a wiki page. Examples: a:Z
SELinux relabel that silently stopped Prometheus writing its WAL; GitLab returning 500s because
podman’s default 64 MB/dev/shmfilled up; GitLab exiting 1 on every stop because its shutdown
stops PostgreSQL before Puma and Sidekiq; and the image health check that disappears because OCI
image configs carry no healthcheck field. - Fedora-specific depth. CoreOS, Zincati, Butane, Quadlet, rpm-ostree, bootc, composefs,
SELinux and toolbox are all used in anger, including one rpm-ostree bug I reported upstream
(coreos/rpm-ostree#5639) and the workaround it needs until a fix ships.
How it got here
The server started as a Hetzner cloud VPS, was rebuilt from scratch on Fedora CoreOS, and
then moved on-prem to physical hardware in September 2026 with a restore, an OOM incident on
day one, and a cutover. The desktop went from Silverblue to my own bootc images (Kaamos, a public
multi-arch Hyprland image built in CI) to Fedora COSMIC Atomic. Both moves shaped the design,
and part 1 tells them briefly.
Proposed parts
- Principles and the standard. Atomic, everything as code, zero trust, self-hosted with no
SaaS dependency, “fewer apps, more integration”. How a 604-row matrix is tailored, ratcheted in
phases (97 level-1 rows first), and enforced by a CI gate that fails on missing evidence. - Fedora CoreOS as a server. Butane and Ignition, Zincati update windows, LUKS2 on an mdraid1
NVMe mirror with TPM2 unlock, Secure Boot with kernel lockdown, btrfs subvolumes per service,
a hardened sshd reachable only through the tunnel, sysctl and name-resolution hardening, and
nftables closing the LAN interface completely. Why journal sealing waits for systemd 262. - SELinux enforcing, without giving up.
:zversus:Zand the incident that taught it,
semodule -DBto surfacedontauditdenials (and why you must runsemodule -Bafter), a
small local module so snapper can snapshot container subvolumes, and a dedicated SELinux domain
for cAdvisor instead of running it unconfined. - Containers with Quadlet. Fourteen containers:
NoNewPrivileges,DropCapability=ALL,
read-only root filesystems and non-root users; health checks plusNotify=healthyas real
readiness so dependent units wait for a service, not just a process; ordered shutdown; memory
limits sized from data; and moving frompodman auto-updateto images pinned by digest and
updated through merge requests. - GitOps for the host. An Ansible converge that CI runs on merge from a dedicated, locked
runner on protected refs only; restarts driven by state, not by “changed”; and a read-only audit
playbook (27 checks today) that runs daily and after every apply, exports its results as
metrics and pages when a check fails or goes stale. The audit is the target state, written down. - A zero-trust edge. Cloudflare Tunnel with no published ports, Access policies with
independent MFA and device posture, WARP in local proxy mode with posture satisfied through a
PAC file, service tokens for machines, and all of it in OpenTofu with the plan read in the
merge request. Includes the design I built and then abandoned, and why. - GitLab, runners and the supply chain. Seven runners with separate trust levels (an
unprivileged buildah builder, an isolated network for security coursework, a deploy runner),
an internal TLS path so CI never touches the public edge, shared pipeline templates with
Trivy, Semgrep, Gitleaks, Bandit, Hadolint, ShellCheck, ZAP and Nuclei, a security gate that
blocks rather than reports, group-level Renovate, and one rule: findings get fixed, never
allow-listed. - Observability as a correctness tool. Replacing two standalone tools with Prometheus, Loki,
Alertmanager, Grafana and Alloy; alerts delivered as GitLab incidents with no relay code;
journal-based alerts for every failed systemd unit; a dead man’s switch; frontend error
tracking with Grafana Faro (source-map delivery still being designed); and treating every
noisy alert as a bug to root-cause. - Backups you have restored. Snapper snapshots per subvolume, encrypted off-site restic copies
read from read-only snapshots by systemd template units, retention per source, and restore
drills. The laptop’s design: its own storage sub-account so a stolen laptop key cannot touch
the server’s backups, plus provider-side snapshots neither key can delete. - Secrets with one source of truth. A password manager as the only place a secret is
authored; git-crypt files, encrypted env files and CI variables generated from it; SSH keys
and commit signing served by its agent so private keys never touch disk; and an inventory of
every secret by name, consumer and copy. - The laptop. COSMIC Atomic with minimal layering; daily staged OS updates and a user timer
for Flatpak, with developer tools deliberately manual; NTS-authenticated time, LLMNR off,
per-network MAC randomization,init_on_free=1with its measured cost, root mount options
moved to kernel arguments because composefs ignores them in fstab; the NVIDIA module signed
for Secure Boot and what Fedora 45’s stricter package verification means for it; dotfiles
under GNU Stow; toolbox and rootless Quadlets for development. Then auditing the laptop to the
same standard as the server. - An AI assistant under policy. Running a coding agent as an untrusted actor: a root-owned
policy with an integrity manifest checked at session start, a sandbox, hooks that block
privilege escalation, memory kept as data in its own repository, commit trailers that name the
model, and no ability to approve or merge its own work.
Status
The server and its pipeline run in production for my own projects and a small business site. The
work is audited in phases against a written target state. Done: the baseline (185 findings from
three earlier audits reconciled, each closed or carried) and the host OS phase. Under way: the
container phase (half of the containers hardened and health-checked so far). Still ahead: edge
and identity, GitLab and CI, observability, backups and restore drills, secrets, and the laptop,
followed by a final verification phase. I would publish each part once its phase closes, so it
describes a finished and verified state, with the open items listed as known limits.
Audience
Intermediate to expert Fedora users and administrators. Each part opens with the “why” in plain
terms, so newer readers can follow the reasoning and take one idea home even if they skip the
detail.
About me
Phat Le, Cyber security student, Full-Stack developer. Portfolio: https://thephatle.dev
Questions for the editors
- Is a series of this depth and length a fit for the Magazine? If twelve parts is too many, I
could combine them into six (1, 2 and 3, 4 and 5, 6 and 7, 8 to 10, 11 and 12). - Would you prefer parts on a schedule, or published as each one is ready and reviewed?
- Is there a preferred way to handle longer command listings and configuration files, such as
linking to the source repositories?
AI disclosure: drafted with the help of an AI assistant (Claude) from my own repositories and
documentation; I reviewed and edited it and take responsibility for its content.