Hermes agent is root-equivalent and its approval gate can be bypassed #9
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
polen/nixos#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Docs state the agent's privilege is limited to
nixos-rebuildon this repo. In practice thehermesuser is root-equivalent and most of the approval gate can be bypassed:devices/server/configuration.nixhas no argument restriction and allowsSETENV.sudo nixos-rebuild switch --flake /any/pathis arbitrary root.python3 /var/lib/hermes/workspace/tmp/*(the agent writes there, so arbitrary code),curl *,nix develop *,nix build *,go test *,sqlite3 *.git push origin *is auto-approved, which contradicts "per-action approval onpolen/*" inAGENTS.md.security.tirith_enabled = false.The agent reads untrusted text (web search, flyers, shared calendars) and runs on a third-party model. One prompt injection gives root on the host that holds the budget data and every sops secret.
Fix (options, to decide)
nixos-deploy.service(same model as the Forgejo runner), so the agent can only deploymain.hermesfrom thedockergroup, or give it a read-only socket proxy.workspace/tmp/*,curl *,nix develop *andgit push origin *from the allowlist, or narrow them.NoNewPrivilegesandProtectSystem = "strict"once sudo is gone.AGENTS.mdanddocs/agent-autonomy.mdto describe the real boundary.