Hi all,
In April, Canonical wrote in The future of AI in Ubuntu that Ubuntu should expose “the primitives needed for agents to operate within existing boundaries, whether that be read-only analysis, tightly scoped permissions for any actions, and full auditability of decisions and outcomes.” That thread is closed now, so I’m starting a new one. I’ve been building an independent, open-source attempt at those primitives, and I’d like feedback from people who know snapd and Ubuntu security much better than I do.
What maat is
maat is an MCP server that lets an AI agent (through Claude Code, OpenCode or similar, with a hosted model or a local inference snap) troubleshoot an Ubuntu machine without being able to change it:
-
It runs in a strict snap that plugs only
log-observe,system-observeandmount-observe, with nonetworkplug.maat selftestshows the confinement holding: the journal and units are readable, internet sockets are refused withEACCES, writes to the home directory are refused, andRestartUnitis refused by AppArmor itself. -
The model can’t run commands. It can only propose a typed plan, such as restarting one failed
.serviceunit, citing the log lines it relied on. -
A person applies the plan with a separate, unconfined tool,
maatctl, which goes through polkit the same waysystemctldoes, and then checks the result. -
Every step goes into a hash-chained audit trail, with checkpoints in the systemd journal.
-
New: one agent can reach many hosts over SSH, using a key that
authorized_keysrestricts tomaat mcp. Each host still runs the confined server.
It’s a developer preview on latest/edge, tested on 24.04 (arm64). 26.04 isn’t tested yet.
What testing taught me
-
network-observeallows outbound TCP and UDP, because it includes thenameserviceabstraction, so maat doesn’t plug it. I’ve opened canonical/snap-docs#679 to say this on the interface page. -
Without it, the
/proc/netsocket tables are denied, and an early version of maat reported that as “no listening sockets”. It now fails closed and says why. -
log-observealso makes two kernel settings writable (printk_ratelimitand AppArmor’s audit parameter) and grantsdac_override. maat refuses to run as root, so file permissions block those writes, but it surprised me for an “observe” interface.
Three questions
-
Would snapd consider a way to read socket tables and routes without network access, for example a variant of
network-observewithout the name-resolution rules? Or is the intended pattern a helper outside the snap? -
Would a strictly read-only
log-observemake sense for diagnostic tools like this, or is refusing to run as root the expected answer? -
Does the permission prompting that landed in 26.04 cover, or plan to cover, interfaces like
log-observe? Approving journal access for one agent session would fit this kind of tool better than a permanent connection.
Any other feedback is welcome, especially on the threat model (docs/security-model.md in the repo) and anything I’ve got wrong about snapd.
maat is an independent project, not affiliated with or endorsed by Canonical.