File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66- Improve MCP error logging to show error code, message, and data instead of null.
77- Improve error handling when MCP promtps fail on server side.
88- Use rewrite-json to edit jsons without losing formatting.
9+ - Allow shell output redirections to ` /tmp/ ` in plan/explorer agents instead of denying them.
910
1011## 0.115.1
1112
Original file line number Diff line number Diff line change 4242(defn get-property [property] (System/getProperty property))
4343
4444(def ^:private dangerous-commands-regexes
45- [" .*[12&]?>>?\\ s*(?!/dev/null($|\\ s))(?!&\\ d+($|\\ s))\\ S+.*"
46- " .*\\ |\\ s*(tee|dd|xargs).*" ,
47- " .*\\ b(sed|awk|perl)\\ s+.*-i.*" ,
48- " .*\\ b(rm|mv|cp|touch|mkdir)\\ b.*" ,
49- " .*git\\ s+(add|commit|push).*" ,
50- " .*npm\\ s+install.*" ,
51- " .*-c\\ s+[\" '].*open.*[\" ']w[\" '].*" ,
52- " .*bash.*-c.*[12&]?>>?\\ s*(?!/dev/null($|\\ s))(?!&\\ d+($|\\ s))\\ S+.*" ])
45+ [" .*[12&]?>>?\\ s*(?!/dev/null($|\\ s))(?!/tmp/ \\ S*($| \\ s))(?! &\\ d+($|\\ s))(?!>) \\ S+.*" ; ; output redirection (except /dev/null and /tmp/)
46+ " .*\\ |\\ s*(tee|dd|xargs).*" , ; ; pipe to tee/dd/xargs
47+ " .*\\ b(sed|awk|perl)\\ s+.*-i.*" , ; ; in-place editing
48+ " .*\\ b(rm|mv|cp|touch|mkdir)\\ b.*" , ; ; file mutation commands
49+ " .*git\\ s+(add|commit|push).*" , ; ; git write ops
50+ " .*npm\\ s+install.*" , ; ; npm install
51+ " .*-c\\ s+[\" '].*open.*[\" ']w[\" '].*" , ; ; python open(...,'w')
52+ " .*bash.*-c.*[12&]?>>?\\ s*(?!/dev/null($|\\ s))(?!/tmp/ \\ S*($| \\ s))(?! &\\ d+($|\\ s))(?!> )\\ S+.*" ])
5353
5454(def ^:private openai-variants
5555 {" none" {:reasoning {:effort " none" }}
Original file line number Diff line number Diff line change 324324 " date"
325325 " env" ))
326326
327+ (testing " redirections to /tmp/ are not denied in plan mode"
328+ (are [command] (not= :deny
329+ (f.tools/approval all-tools shell-tool
330+ {" command" command} {} config " plan" ))
331+ " gh api repos/editor-code-assistant/eca-emacs/contents/eca-chat.el --jq '.content' 2>/dev/null | base64 -d 2>/dev/null > /tmp/eca-chat.el && wc -l /tmp/eca-chat.el"
332+ " echo test > /tmp/output.txt"
333+ " cat file.txt > /tmp/result.log"
334+ " ls -la >> /tmp/listing.txt"
335+ " some-cmd 2> /tmp/errors.log"
336+ " bash -c 'echo test > /tmp/file.txt'" ))
337+
327338 (testing " same commands work fine in code agent mode (not denied)"
328339 (are [command] (not= :deny
329340 (f.tools/approval all-tools shell-tool
You can’t perform that action at this time.
0 commit comments