•
9 min read

Hardening Desktop Plugins That Hand System Logs to AI Agents

By: Carlos Granier
Top-to-bottom technical cutaway showing a Linux desktop top bar, plugin tiles, and an AI agent window separated by a glowing cyan security bulkhead and padlock shield from untrusted crash waveforms, blocked symlink forks, and clipped log streams below.
Table of Contents

Between September 18 and October 5, 2026, I shipped eleven open-source plugins for the Omarchy Linux desktop bar: crash history, systemd journal triage, service health monitors, an agent fleet panel, and a drag-and-drop file shelf. Several of them do something increasingly common in developer tooling: they read live system state and hand a problem to a local AI coding agent with one keystroke.

Every plugin submitted to plugins.omarchy.org passes through an automated commit validator, a static security scan, and a human maintainer review. Those reviews sent several of my early releases back. Each rejection exposed a concrete failure mode that shows up wherever desktop tools, shell wrappers, and AI agents meet untrusted system data. Turning those rejections into a pre-submission hardening checklist changed how every plugin after them was built and tested.

The constraints

A bar plugin looks small, but it runs inside a privileged trust boundary.

ConstraintReality
Execution contextRuns continuously inside the live Quickshell / Hyprland desktop bar on a daily-driver laptop (2015 Surface Pro 4)
Untrusted inputsCrashing binary names, systemd-coredump records, journalctl output, socket streams, and files dropped from shared directories
Agent handoff riskOne keypress launches a local AI coding agent (omarchy-default-agent) with terminal and filesystem tools
Multi-user OS boundariesCLI arguments are visible to other local users in /proc; shared directories are vulnerable to symlink swaps between check and open
Review gateAutomated validation on the exact git commit plus static security checks and maintainer review before listing

The boundary: untrusted system data never touches a prompt or argv

Before hardening, the plugins treated local system tools (coredumpctl, journalctl, herdr) as friendly internal data sources. The security reviews forced a strict separation:

  • System output is untrusted data, never prompt text. Any process on the machine can choose its own binary name, argv string, or log line. Interpolating those strings into an AI agent’s initial prompt turns a crash or noisy daemon into a prompt-injection vector.
  • The desktop shell never parses unbounded streams or opens state files directly. External helpers cap bytes and runtime before the shell sees a line, and filesystem operations walk held file descriptors rather than paths.
  • Agents default to asking before acting. Bypass flags (autoApprove) moved behind an explicit user setting instead of running by default on a crash or journal alert.

Three real security findings and how they were fixed

Every fix below comes directly from the marketplace review commits across Crash Desk, Fault Line, Herd, Capture Inbox, and Drop Zone.

1. Crash text and journal logs injected into agent prompts (3d8265e, 0747a43, 5954152)

  • Symptom: Crash Desk passed the crashing process name and binary path into the AI agent’s diagnosis brief, Fault Line carried systemd journal text into its handoff, and launched agents ran with permission-bypass flags by default.
  • Root cause: A crashing program controls its own process name and log messages. Copying those strings into an agent prompt lets untrusted text steer a tool-using coding agent, and default auto-approve flags removed the human confirmation step.
  • Fix: Crash Desk v0.2.1 stripped process and binary names out of the prompt completely: only the numeric PID, the coredumpctl info command, and an explicit instruction to treat command output as untrusted data reach the agent, while crashdesk-agent rejects extra arguments (tests/agent.test.sh verifies the brief against stub launchers). Fault Line (5954152) stopped forwarding log text and now passes only a shape-checked unit name, the failure shape, and the journalctl command. Crash Desk v0.2.3 and Fault Line v0.1.3 made agents ask before acting by default, reserving bypass flags for an explicit autoApprove opt-in.

2. Unbounded command output could flood or wipe the desktop bar (d4e4077, 4955481)

  • Symptom: Collectors reading coredumpctl, journalctl, and herdr had no byte ceilings or deadlines. A noisy service or runaway socket stream could bloat the desktop shell’s memory, and naively truncating a capped output made the parser treat a full crash log as an empty history.
  • Root cause: Polling commands piped stdout straight into QML without size caps or timeouts, and parsers did not distinguish an empty result from a truncated one.
  • Fix: Every spawned process got a hard timeout deadline and byte caps before the shell sees the data. Crash Desk v0.2.4 asks coredumpctl for the newest 500 crashes and cuts stdout at 2 MB (256 KB for coredumpctl info, 4 KB for agent probes); if a listing hits the cap, parseListing marks it unreadable and preserves the last good list instead of clearing the panel (tests/bounds.test.sh tests the exact QML pipelines against a stub that floods stdout). Herd (4955481) capped herdr polls at 2 MB stdout / 64 KB stderr, shape-checked every ID before it reaches argv (0e71312), and moved the event socket out of the shell into bin/herd-events with a 64 KB frame cap and a 32 MB connection budget that restarts cleanly on overflow (tests/events.test.sh).
  • Symptom: Early helpers passed state payloads and clipboard text on the command line, and Drop Zone v0.2.0’s new SSH delivery used Python’s tarfile.add(), which checks a source path with lstat() and reopens it later by path without O_NOFOLLOW.
  • Root cause: Command-line arguments are readable by other local users via /proc. Opening a previously checked path a second time creates a time-of-check/time-of-use (TOCTOU) race: if another local user can write to a directory along the path, they can swap a file for a symlink to a private file between check and open.
  • Fix: Crash Desk v0.2.5, Fault Line v0.1.2, and Capture Inbox v0.2.2 moved all clipboard, note, and state payloads onto stdin and stopped the shell from opening state files directly. Their state helpers walk $HOME down to the state directory with O_NOFOLLOW|O_DIRECTORY, verify each open descriptor, and create (O_EXCL|O_NOFOLLOW, random name) and rename files relative to the held directory descriptor (tests/state.test.sh reproduces a directory swap). When Drop Zone v0.2.0 added SSH tar delivery and marketplace review #10285 flagged tarfile.add(), v0.2.1 (487cdc8) rebuilt the tar stream directly from held descriptors, verifying (st_dev, st_ino) via fstat on every file and folder, applying the umask to copies, and checking that destination host folders are owned by the user and not group- or world-writable (tests/send_race.test.py reproduces the symlink swap alongside 69 shell tests and 16 model tests).

The six-rule hardening checklist

Every review finding became a permanent check applied before submitting a plugin:

#RuleEnforcement patternTest proof
1Never put untrusted text into an agent promptPass only validated IDs/PIDs and the read command; label command output as untrusted dataStub-launcher prompt tests (agent.test.sh)
2Agents ask before acting by defaultNo permission-bypass flags unless explicitly opted in via configLauncher flag assertions
3Bound every external read in time and bytestimeout + head -c caps; treat capped output as unreadable and keep last good stateFlood-stdout stubs (bounds.test.sh, events.test.sh)
4Validate external IDs before argvStrict character/shape checks before any external value reaches a command lineModel + CLI boundary tests
5Pass payloads over stdin, never argvKeep clipboard, note, and state text out of /proc process listsHelper CLI refusal tests
6Never reopen a checked path by nameWalk directories with O_NOFOLLOW|O_DIRECTORY, verify (st_dev, st_ino) via fstat, atomic O_EXCL createsSwap-race tests (state.test.sh, send_race.test.py)

What happened when the checklist ran on a new plugin

Drop Zone v0.1.0 was the first plugin built from scratch against rules 1 through 6. It passed its initial marketplace validation on the first try with zero security findings.

Just as useful is what happened one day later when v0.2.0 added a new attack surface (tar-over-SSH delivery to remote hosts). Marketplace review #10285 caught the tarfile.add() TOCTOU gap, which closed rule 6 across remote transfers too and added an automated race-reproduction test. A checklist stops you from repeating old mistakes; a second pair of eyes and adversarial tests catch the new surface when features expand.

By October 30, 2026, the ten listed plugins had reached 146 install-command copies, 1,110 views, and 17 hearts on plugins.omarchy.org, with Crash Desk leading at 39 copies.

Where this pattern transfers

Any company building internal developer tools, ChatOps bots, or incident-triage workflows faces the exact same traps. An alert handler that pastes raw error logs, ticket bodies, or customer filenames straight into an LLM prompt with write-capable tools is Crash Desk v0.2.0 at enterprise scale. Separating untrusted data from instructions, defaulting tool-using agents to human approval, bounding every downstream command in bytes and time, and turning every security review finding into a reusable test harness is how an internal AI tool survives real operations.

All eleven plugin repositories and the live marketplace breakdown are on the Omarchy plugins project page.

New posts by email

New posts and case studies, sent when they're published. Unsubscribe anytime.

About the Author

Carlos Granier is a Tech Founder, CTO, and AI Strategist with 25 years of experience building at the intersection of technology and business. He co-founded Pongalo, one of the first US Hispanic OTT platforms, and built a YouTube MCN to 200M+ monthly views. He now helps founders and executives implement AI as practical infrastructure. Based in Miami, Florida.

Connect on LinkedIn • Book a call

Let's Connect