MGS2007: exec denied by sandbox
A spell tried to execute a binary whose resolved path is outside the configured allowlist.
[MGS2007] exec denied: /home/user/.local/bin/exfil
Why
The sandbox denies execution of binaries whose absolute path is not
under the workspace, /tmp, or a system library or executable
directory (/usr/bin, /usr/local/bin, etc.). This blocks the
attack pattern of dropping a small binary into ~/ and running it.
The binary path is the value returned by exec.LookPath, so an
unqualified curl resolved from $PATH is checked at /usr/bin/curl,
which is allowed.
Resolution
-
Built-in spells: should never trigger this. If they do, file a bug.
-
Third-party spells trying to run a tool you installed locally (e.g. a custom binary under
~/.local/bin): the spell expects an external binary it did not ship. Add the directory to your allowlist:sandbox: allow: - path: ~/.local/bin mode: rorois sufficient: execution requires read access, not write. -
Malicious spell dropping and running a binary: do not extend the allowlist. This is sandbox working as designed.