macsiem
A home-built security monitor for my MacBook and home Linux server that also watches the AI coding agents working on them.
macsiem is a security monitor for my MacBook and my home Linux server. I designed it, direct the work, and run it; AI coding agents wrote most of the code. I started it on 2026-10-08, and the Linux sensor has been live since 2026-10-18.
Architecture
On the Mac, macsiem reads Apple’s Endpoint Security event stream (process starts, file access). On Linux, it reads the kernel audit log and the system journal. One pipeline normalizes the events, stores them in SQLite, and evaluates detection rules written in YAML. The rules carry MITRE ATT&CK technique references.
A rule is either learning or paging. A learning rule only records what it sees. A paging rule sends an alert to my phone. New rules start in learning.
Agent hook
Tool calls made by AI coding agents pass through a hook. On the Mac, the hook can refuse a short deny-list of actions, such as reading credential stores or using sudo. Root owns the hook and its settings, so an agent cannot edit them.
On the Linux server, the hook only observes. The limits there come from the operating system: a separate unprivileged account, a per-user firewall, and audit logging. On the server, macsiem checks each hook event against the kernel’s own record of the process that sent it.
Development
I record every design choice in a decision log, which has 118 entries. The merged codebase has 705 automated tests with 0 failures on Python 3.9 and 3.12, including inside a sandbox with no home directory and no network.
In November 2026, three models reviewed the whole codebase independently before a planned public release. Two of their findings:
- A test meant to be isolated had been checking real monitored files on every run. The suite now runs under a guard that fails any test reaching outside its temporary folder.
- After a macOS upgrade, the installer reported failure on a healthy install. The cause was a start-up timing race between two services.
Why the code is private
After that review, I decided to keep the code private. A detection tool’s rules and documents describe what one real setup watches and, by omission, what it does not.