Fail-closed signed update system for Linux fleets
  • Go 54.1%
  • TypeScript 21.8%
  • Rust 9.6%
  • QML 4.8%
  • PowerShell 2.7%
  • Other 6.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Source publisher 2536794553 source: advance the checked projection
Source-Sha: b2b674190a61f037f23092eadc47eb50eb36eaa2
Policy-Sha: 9278bf5dd4e7e0d523c0d833fdbac5e9af20d0771540663e1158d50ff356c5aa
Tree-Digest: aedf58c7c1bdf315efec6ddb157fc8c70b7b941a38efa78cf63f6852a85c4626
2026-11-17 19:17:53 +00:00
agent source: advance the checked projection 2026-11-17 19:17:53 +00:00
config projection: begin the exact-path public epoch 2026-09-08 21:59:33 -04:00
desktop source: advance the checked projection 2026-11-17 19:17:53 +00:00
helper source: advance the checked projection 2026-11-17 19:17:53 +00:00
installer source: advance the checked projection 2026-11-17 19:17:53 +00:00
protocol/testdata source: advance the checked projection 2026-11-17 19:17:53 +00:00
scripts source: advance the checked projection 2026-11-17 19:17:53 +00:00
server source: advance the checked projection 2026-11-17 19:17:53 +00:00
web source: advance the checked projection 2026-11-17 19:17:53 +00:00
.govulncheck-allow projection: begin the exact-path public epoch 2026-09-08 21:59:33 -04:00
allowed_signers source: advance the checked projection 2026-11-17 19:17:53 +00:00
docker-compose.yml projection: carry the corrected Windows alpha 2026-09-10 18:03:01 -04:00
LICENSE projection: begin the exact-path public epoch 2026-09-08 21:59:33 -04:00
Makefile source: advance the checked projection 2026-11-17 19:17:53 +00:00
README.md source: advance the checked projection 2026-11-17 19:17:53 +00:00
THIRD_PARTY_LICENSES.md source: advance the checked projection 2026-11-17 19:17:53 +00:00

RedFlag

Understand and govern the machines you own.

AGPL-3.0 · pre-release

Public release availability and anonymously verified downloads are collected at caseytunturi.com/downloads. The public release record keeps versions and artifacts. A published prerelease is not production acceptance.

Where this lives

RedFlag is developed in a private forge and published outward through one gated path. Three public copies exist and they are not equal:

forge.caseytunturi.com/Fimeg/RedFlag canonical The public source of record. Every public commit arrives here first, through a publication gate, and is verified anonymously before anything downstream moves. Inspect the code here.
github.com/Fimeg/RedFlag mirror A downstream copy of the exact Forgejo commit, for discovery and for issues. Nothing is developed here and nothing is published here first.
codeberg.org/Fimeg/RedFlag mirror, may lag Best-effort. It is allowed to fall behind rather than hold canonical publication closed, so check its commit against Forgejo before trusting it.

Public history begins at a deliberate projection epoch: the tree is constructed from private source under a path policy rather than being whatever happened to sit on a branch. Each public commit carries Source-Sha, Policy-Sha and Tree-Digest trailers binding it to what produced it.


RedFlag is a local-machine operations console and a self-hosted fleet authority. The native Qt/QML Desktop asks what this computer is doing now: health, resources, processes, connections, services, containers, installed software, updates, security evidence, and history. RedFlag Web asks the same questions across many machines.

The Endpoint owns observation and machine state. Desktop expresses operator intent; it does not shell out to package managers, service managers, or Docker. With the default strict posture, privileged mutation crosses RedFlag's signed authority path or it does not happen. The fleet server cannot lower that posture remotely; an administrator with local control of the host can change it there.

What makes RedFlag different: the software that patches your fleet runs as root on every box, which makes it part of your attack surface — XZ Utils came through a build pipeline, SolarWinds came through an update. The server signs commands with Ed25519. Endpoints default to strict verification and reject anything forged or replayed; local host administrators retain authority over their own Endpoint's enforcement posture. Every package change crosses one mutation envelope: a resolved manifest, an authorization bound to its hash and to one target, and replay custody. A privileged Rust Helper checks the envelope and runs a fixed plan with a cleared environment. It accepts pacman, APT and DNF on Linux, and Windows Update and machine-wide MSI installs through Winget on Windows; Windows execution is in testing. Docker containers are observed, not changed through this path. The full trust model is in SECURITY.md.


Dashboard Agent Health Dependency Resolution
More screenshots
Live Ops History Docker
Heartbeat Windows Agent Agent List
Upstream Tracking Updates

RedFlag Desktop

Desktop is the native view of this machine, not a web dashboard wrapped in a window. It is built in Rust with Qt/QML and talks to the Endpoint over a local Unix socket or Windows named pipe.

The current Linux cut includes:

  • live CPU, load, memory, swap, network, storage, and thermal history
  • process inventory and drill-down with sockets, namespaces, capabilities, service/container ownership, and owning package
  • systemd services, Docker containers and Compose stacks
  • installed pacman, dpkg/APT, and RPM/DNF software inventory with dependency and file detail
  • available updates, advisories, policy evidence, approval, and recorded override intent
  • queueing the updates that passed the gate
  • repository browsing with installed and not-installed filters
  • security posture and durable local history

On Windows, one setup installs either the Server or the Desktop role; it is in testing. The web application remains the fleet surface; it is not embedded into Desktop.


Quick Start

Server

git clone https://forge.caseytunturi.com/Fimeg/RedFlag.git
cd RedFlag
cp config/.env.example config/.env
docker-compose build && docker-compose up -d

Open http://localhost:31336, complete the setup wizard, then restart:

docker-compose down && docker-compose up -d

Endpoint

Get a registration token from Settings → Token Management, then:

Linux / macOS:

curl -sfL -H "X-Registration-Token: your-token" "https://your-server.com/api/v1/install/linux" | sudo bash

Windows:

A Windows setup with Server and Desktop roles is in testing. Until it ships, run elevated Windows PowerShell with an operator-installed OpenSSL 3 executable on PATH (Get-Command openssl). The installer checks Ed25519 acceptance and rejection before changing the Endpoint. Missing verification support, unsigned or invalid signatures, and manifest hash mismatches stop installation. Installing PowerShell 7 alone does not supply this verifier.

iwr -Headers @{"X-Registration-Token"="your-token"} "https://your-server.com/api/v1/install/windows" | iex

What It Manages

Platform Package Managers / Scanners
Linux pacman, APT, DNF, Docker (socket, observed)
Windows Windows Update (COM), Winget, Docker (socket, observed)

Advisories come from OSV.dev for APT and DNF and from the Arch Security Tracker for pacman.

Endpoints run at the OS level and query the Docker socket directly — there's no separate container agent. Endpoints are pull-based: they check in every 5 minutes and execute what the server has approved. The server never initiates a connection.


Security

The update manager is attack surface, so it gets treated like one: Ed25519-signed commands with replay protection, hardware-bound Endpoint identity, rotating refresh tokens that burn loudly when stolen, and a separate privileged Helper that executes every package change. The Helper checks the envelope's hash, target, signature, validity window and replay custody, then runs a fixed package-manager plan without a shell or inherited environment.

The APT/DNF dry-run must resolve the top-level artifact hash before a capability can be minted. Successfully resolved dependency hashes are included, but unresolved dependency hashes can currently be omitted. The helper rehashes artifacts supplied by local path and refuses a missing or mismatched mirror artifact; normal registry entries without local paths are not rehashed helper-side. Its systemd-run unit is short-lived and runs without a network (PrivateNetwork=yes). Complete transitive closure pinning and local custody of every byte remain design work rather than implied guarantees.

The full trust model lives in SECURITY.md, including how to report a vulnerability. The architecture and its known gaps are documented in the RedFlag Architecture Framework (RAF), which will be published after review.


Architecture

┌─────────────────────────────┐
│  Server (Go)                │  PostgreSQL · Ed25519 Signing Service
│  Embedded React dashboard   │  Dashboard: 31336 · Endpoint API: 31337
└────────┬────────────────────┘
         │ Pull-based (Endpoints check in, not the reverse)
         ├──────────────────────┐
┌────────▼──────────┐  ┌────────▼──────────┐
│  Linux Endpoint   │  │  Windows Endpoint │
│  pacman/APT/DNF   │  │  WUA / Winget     │
│  Docker socket    │  │  Docker socket    │
├───────────────────┤  ├───────────────────┤
│  Rust Helper      │  │  Rust Helper      │
│  Desktop (Qt/QML) │  │  Desktop (Qt/QML) │
└───────────────────┘  └───────────────────┘

Features

  • Approval workflow — updates queue for human review before anything runs
  • Maintenance windows — day/time gates on when installs can proceed
  • Upstream tracking — polls GitHub, Forgejo/Gitea/Codeberg, GitLab, Bitbucket for new releases; flags EOL drift
  • Drift detection — knows what should be installed vs. what is, bridges the gap into update packages
  • Endpoint self-update — SHA-256 → signature → atomic binary swap → service restart, reconciled server-side
  • Dependency dry-run — checks before installing, not after
  • Idempotent installer — re-running won't create duplicate Endpoints
  • Proxy support — HTTP/HTTPS/SOCKS5 for restricted networks
  • Native services — systemd on Linux, Windows Services on Windows
  • Full audit trail — all operations logged with context, sanitized against log injection
  • Native local console — live machine health and operations beside the Endpoint, with no browser or cloud dependency
  • Connected inspection — follow a process into its service, container, socket, capability set, and owning package

Status

Compiles, runs on the maintainer's stack, not yet battle-tested. No live deployment outside the dev environment. The supply-chain gate has completed an end-to-end run (2026-06-05: hyprutils through capability-token minting, helper verification, and install on a live Fedora agent). Treat everything below as "implemented and locally exercised, not production-proven."

Implemented:

  • Linux and Windows Endpoint registration and update management
  • pacman, APT, DNF, Winget, Windows Update, Docker image scanning
  • Advisories from OSV.dev (APT, DNF) and the Arch Security Tracker (pacman)
  • Package state machine with enforced transitions and lifecycle orchestrator
  • Failed state recovery: reopen, resolve, and transition out of failed
  • Lifecycle history with status badges, version transitions, and failure reasons
  • Scan-set closure reconciler (close-by-absence) — fixes out-of-band false positives
  • Dry-run dependency checking with a mandatory top-level hash and best-effort transitive hash resolution
  • Supply chain gate: OSV batch checks across reported resolved entries, vuln-is-a-full-stop enforcement for the checked set, audited override path
  • Version soak-gating and package age gate as configurable policies
  • One mutation envelope for pacman, APT, DNF, Windows Update and Winget MSI, executed by the Helper (Windows execution in testing)
  • Ed25519 key rotation and replay protection
  • Maintenance windows
  • Upstream version tracking (GitHub, Forgejo/Gitea/Codeberg, GitLab, Bitbucket, Repology, endoflife.date)
  • Metadata pipeline: CVE details, upstream intelligence, package provenance
  • Auto-discovery bridge (Repology, container registry, exact match)
  • Endpoint self-update via the privileged Helper (zero Endpoint sudo)
  • Binary self-update (Endpoint, Helper, Desktop) through the same signed, hash-pinned capability-token gate as package installs
  • Process explorer: on-demand /proc scanning (sockets, capabilities, namespaces) with inode correlation
  • Setup accepts an operator-supplied signing keypair — bring-your-own-key deployments
  • Reversible token encryption with one-liner restore
  • Real-time heartbeat and rapid polling
  • Native Qt/QML Desktop source for health, performance, processes, network, storage, containers, services, software, updates, security, and history
  • Installed software across the fleet, Windows included, and package search across every Endpoint
  • Kernel observation: the Helper attaches eBPF LSM hooks to package-owned paths on Linux and the Endpoint records the changes it sees; Windows App Control policy state is reported

Not yet done:

  • No AUR, Snap, Flatpak, or Homebrew support
  • macOS Endpoint binaries not signed
  • Mobile dashboard usable, not optimized
  • Cert pinning and enforced TLS verification
  • Complete transitive closure hashing for APT/DNF; unresolved dependency hashes can currently be omitted
  • Helper-side rehashing of normal registry artifacts before mutation
  • Native proof of Windows Update and Winget execution through the Helper
  • Docker changes through the mutation envelope
  • Kernel enforcement: the eBPF hooks observe, they do not yet block writes outside an authorized transaction
  • Windows setup (Server and Desktop roles) is in testing
  • GPU telemetry, rich disk health, and vendor-specific power sensors

Updating

git pull && docker-compose down && docker-compose build --no-cache && docker-compose up -d

Endpoint self-update runs from the dashboard. Requires a real service manager (systemd on Linux, SCM on Windows). Container-only Endpoint deployments can't self-update through this path — redeploy with the new image instead.

If a self-update times out, the previous binary is preserved at <binary>.bak on the Endpoint host. Restore manually and restart the service.

Nuclear option (full reset)
docker-compose down -v --remove-orphans && \
  rm config/.env && \
  docker-compose build --no-cache && \
  cp config/.env.example config/.env && \
  docker-compose up -d

This wipes all data including the database. Re-register Endpoints afterward with new tokens.


Philosophy

RedFlag follows ETHOS:

  • Honest — what you see is what you get
  • Transparent — errors logged with full context, sanitized against injection
  • Secure — hardware binding, cryptographic verification, local-only logging
  • Open standards — no vendor lock-in, no cloud dependency, no telemetry

The maintainer runs this on their own infrastructure. Releases are versioned, migrations are idempotent. If something breaks, the error shows up in full — not swallowed into a generic failure message. Log output is sanitized against injection (ANSI stripping, control character replacement, field truncation) but the content is preserved.

Built for operators who'd rather own the problem than outsource it.


Free, Forever

RedFlag will never be monetized. No pro tier, no cloud edition, no per-agent pricing — those are the things it exists to replace. This is my resume piece, built in the open and given away, because the update manager is part of everyone's attack surface — not just the orgs with an RMM budget.

The architecture documentation — the RedFlag Architecture Framework (RAF) — will be published alongside the code once it has been reviewed: how the system is built, why the design landed where it did, and the pitfalls we think are still out there. Not a guide to attacking it; the reasoning behind the madness, so you can judge the security model yourself instead of trusting a README. I haven't thought of everything — that's part of why it will be published.

If community adoption takes off, ownership and contribution policies will be made transparent and stay open. This project does not get quietly captured.

If RedFlag holds your fleet and you want to give back: sponsor the work, or better — hire the person who built it.


Changelog

Release notes live with each public release.

0.2.9 (in development) — Endpoint rename; one mutation envelope across pacman, APT, DNF, Windows Update and Winget; Arch Security Tracker advisories; installed software across the fleet; repository browsing in Desktop; Windows setup with Server and Desktop roles (in testing); eBPF package-path observation.


License

AGPL-3.0 — see LICENSE.

Third-party: Windows Update integration based on windowsupdate (Apache 2.0).