Skip to content

Add Moat, an endpoint security agent for Omarchy - #424

Open
the2dl wants to merge 7 commits into
omacom:masterfrom
the2dl:add-omarchy-moat
Open

the2dl wants to merge 7 commits into
omacom:masterfrom
the2dl:add-omarchy-moat

Conversation

@the2dl

@the2dl the2dl commented Sep 13, 2026 •

Copy link
Copy Markdown

I built Moat to help protect the machine people actually work on: their Omarchy desktop. This PR makes it available as an optional package, initially on edge for x86_64.

Moat relies on Cilium Tetragon for its kernel-level eBPF sensing. This package bundles the pinned upstream Tetragon 1.7.1 userspace and BPF objects, together with Moat’s tracing policies and service configuration. Tetragon must be running for Moat’s runtime monitoring to work; Moat adds workstation-specific correlation, explanations, and desktop integration on top.

Developers routinely give third-party code their own permissions through package installs, build scripts, editor extensions, and AI tools. A malicious dependency does not need root to read an SSH key or cloud token. Everyday users face the same problem when software reaches for browser sessions, adds an autostart entry, or tampers with their files.

Moat brings workstation-focused detection and optional prevention into Omarchy. It combines upstream Tetragon/eBPF sensors, a Rust correlation daemon, package scanners, and a Bubblewrap sandbox. It watches credential access, persistence changes, suspicious execution and network activity, and correlates related events through the process tree so a sequence can be reviewed as one incident.

The companion Omarchy shell plugin provides a Now queue, history, explanations, and review actions. The aim is to give developers useful evidence while making the result understandable to people who do not work in security.

This package includes:

  • moatd, moatctl, 52 tracing-policy templates, systemd units, and configuration.
  • Install-time scanners and sandbox shims for common package managers.
  • Agent-session attribution, AI credential-access detection, workspace configuration-to-execution correlation, and an opt-in isolated tool runner.
  • Signed public threat-feed support and optional decoy credentials.
  • Optional analysis through the user's AI agent and optional SIEM export.

Runtime monitoring is the default; runtime blocking and containment are explicit choices. Installing the package does not start its services. The shell plugin is installed separately. Kernel BTF and BPF LSM support must be checked before enabling enforcement.

No endpoint telemetry is uploaded by default. Public threat feeds are downloaded from the configurable feed.runts.net mirror and verified locally. Enabling AI analysis or SIEM export uses the user's configured agent/account or destination. Core detection does not require a hosted Moat account.

Release 0.1.0-182 adds protections for Omarchy’s agent-assisted development workflow: tool descendants retain their observed agent session, generic Node/Bun processes no longer receive an AI-credential exception, and changed workspace configuration can be correlated with a referenced script execution. The new moat-agent-tool runner isolates explicitly routed commands from host credentials and disables their network access by default. The optional moat-agent claude launcher disables built-in tools and routes that session through a local broker with fixed workspace/network grants. Normal agent launches and user settings remain unchanged. Additional Codex/Gemini/OpenCode configuration parsing is off by default. First-seen configurations establish a quiet baseline; changed-config execution findings have a per-file ten-minute cooldown. These detections are monitor-only. The authenticated Claude frontend remains trusted; this is not an OS sandbox around the whole agent. Scope and limitations.

Automatic triage now reads an explicitly mounted incident directory instead of the host filesystem, preventing broad investigation searches from opening planted decoys. Its evidence and authentication mounts are read-only; unavailable evidence or unsupported non-native agent runtimes leave alerts pending. Desktop alert popups require Now eligibility, including for critical alerts; contained/noise-guard exceptions and History-only burst popups are removed. A live native Claude check successfully read staged evidence in the new sandbox. The headless-agent rule recognizes the root-owned, host-namespace moatctl triage → restricted sandbox lineage, preventing triage from alerting on itself while keeping credential and decoy detections active. Omarchy mise shims resolve through their installed native latest link without invoking mise or its maintenance hooks.

The recipe builds Moat from the SHA-256-verified archive of commit 9809f4f89c84b37a3596855af55666d8b82b965e, bundles the pinned upstream Tetragon 1.7.1 x86_64 release, and preserves administrator configuration on upgrades. It follows the repository's source: local metadata with an explicit edge-only channel.

Validation: local x86_64 source-archive package build with 904 Rust tests, 262 scanner tests, 90 sandbox/broker tests, and policy validation passing (three existing Rust tests ignored). The companion shell passed 335 UI tests, including notification eligibility matching the Now queue. A live Claude smoke test exposed only mcp__moat__shell, successfully executed an isolated tool, and did not run a test project hook or extra MCP server. Previous live capability-policy validation confirmed that a capability drop stays quiet, a requested gain is detected, and Moat sandbox startup stays quiet. The repository's container build and other architectures have not been validated. This is workstation protection with ongoing false-positive tuning, not a guarantee against root compromise. I'd welcome maintainer feedback and wider edge testing before broader availability.

Source · Handbook

@ryanrhughes ryanrhughes added the build-approved Maintainer approved this PR to build on the self-hosted pool label Sep 28, 2026

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

build-approved Maintainer approved this PR to build on the self-hosted pool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants