- The LLM bridge runs as Hermes's user but saw the host's /run. Where
same-uid ptrace is allowed, Hermes could take it over and reach any
socket there. It now gets Hermes's sandbox, with only llm.sock.
- A socket on a read-only mount still accepts connect(), so
ProtectSystem=strict doesn't hide sockets under /var/lib. /var/lib is
now empty, with the state directory bound back in.
- ProtectProc=invisible and ProcSubset=pid: other processes, and their
command lines, are out of sight.
Generated-by: Claude Opus 5.5
A NixOS module (nix/hermes-guest.nix) layers confinement on upstream's
services.hermes-agent: no network (PrivateNetwork), an empty /run with
two Unix sockets bound back in, and no user manager. Hermes reaches the
world through host.sock, the guest's Endo methods (listMessages,
request, lookup, reply, ...) as MCP, and llm.sock, an inference proxy
that holds the API key.
The same unit runs on a Linux host (nix/linux-host.nix) and in a vfkit
microVM on macOS (nix/vfkit-vm.nix), where systemd relays the two
sockets over vsock to launchd on the host (nix/darwin-host.nix).
test/demo.py runs unmodified Hermes against a fake host and a scripted
model, and checks what the host received.
Generated-by: Claude Opus 5.5