MGS2001: path read denied by sandbox
A spell tried to read a file outside the workspace and outside the configured allowlist.
[MGS2001] fs read denied: /home/user/.aws/credentials
Why
The sandbox confines magus's subprocesses and in-process spells to the
workspace plus a curated allowlist of toolchain, cache and system paths.
Reads of dotfile-style credential stores in $HOME are exactly what
compromised supply-chain packages target, so they are denied by default.
Resolution
-
If this is a malicious spell (the path is a credential file you never asked the spell to touch): do not lift the restriction. This is the system working as intended. Uninstall the spell and report it.
-
If this is a legitimate spell that needs to read an external path (e.g. it reads
~/.terraform.d/pluginsto discover providers): add the path to your workspace'smagus.yaml:sandbox: allow: - path: ~/.terraform.d/plugins mode: romodeisro,rw,rxorrwx. Use the narrowest mode that lets the workflow succeed. -
If you want to turn the sandbox off for one invocation while you investigate:
magus --sandbox=off run buildThe flag, not
MAGUS_SANDBOX: the variable is a floor thatmagus.yamlcan raise and never lower.Do not set
sandbox.mode: offinmagus.yamlto silence a real denial.