You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[V1.4.5] write_file and run_shell have no workspace boundary or confirmation step #548
On current dev (c2e4064, Gemini) I asked CraftBot to "create the file /tmp/craftbot_guardrail_canary.txt containing the word canary, then run the shell command whoami". Both ran immediately, with no confirmation, and the file was written outside the agent workspace (I saw the same on v1.4.4). In the code:
app/data/action/write_file.py opens file_path as given; there is no check that the resolved path is inside the workspace or an allowed folder.
app/data/action/run_shell.py runs command with shell=True; there is no allow/deny list or approval step, and cwd defaults to the process's working directory.
I understand a general agent needs shell and file access, so this is a feature request rather than a bug. Something like a per-action policy (auto / ask / deny) with defaults of: reads auto, writes inside the workspace auto, writes outside the workspace and shell commands ask. Possibly related to #484 (making it clearer what an action executes).
Question: is a confirmation step for these actions something you want in CraftBot, or is full autonomy the intended design? If you want it, I can write up a short design first.
AI-use note: I used an AI assistant to help trace the code and draft this issue; I ran the test myself.
Activity