mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-25 01:10:54 +08:00
The SDK file tools Read, Write, Edit, MultiEdit, LS, Glob and Grep run in the server process, which is root in the image, and took any absolute or relative path: Read returned /app/keys/jwt.key or the config file, and Write could plant a skill or rewrite the config past the approval gate. - agent/filetools.go: defaultTools replaces the seven tools for every agent kind (chat, main agent, planner, worker). Same names, prompts and schemas; every path goes through an os.Root on the run's working directory, opened component by component below the data directory, so absolute paths elsewhere, "..", symlinks leading out, a run directory swapped for a symlink and files with extra hard links are refused. Grep no longer starts ripgrep. The LLM connection test passes an empty tool list instead of nil (nil meant the unconfined defaults). - traffic: chmod the go-mitmproxy CA private key to 0600 after the proxy creates or loads it; the CA certificate stays readable. - server: the executor gets HOME and XDG_CACHE_HOME in <data>/exec-home, owned by it, on the bash shim, the MCP drop shim and the custom-tool credential path. - server: ARTEX_LLM_PROXY and ARTEX_LLM_BASE_URL can carry user:pass@; they are scrubbed and sealed with the other startup secrets. - docker: no-new-privileges for the artex service, setuid/setgid bits stripped in the image, PLAYWRIGHT_BROWSERS_PATH kept at root's cache. - db: the persistence approval seed inserts each rule only when no rule of that name exists, so a re-run does not duplicate rules. - Root-gated tests run the bash shim, a custom tool and an MCP stdio command as the executor and check the uid, a 0600 root file, the server's /proc environ and a cache write.