fix: remove cat from allowed shell commands and fix stale display tests
Remove cat from allowed_commands to close shell redirect bypass vector (read_file provides safer alternative). Update display tests to match render_user_message returning Text instead of Panel, and shell test to use head instead of cat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -90,6 +90,6 @@ class TestRunCommandTool:
|
||||
# Create a file in the workspace to verify cwd
|
||||
(ws / "marker.txt").write_text("found")
|
||||
tool = RunCommandTool(ws, cfg)
|
||||
result = tool.run("tc-9", {"command": "cat marker.txt"})
|
||||
result = tool.run("tc-9", {"command": "head marker.txt"})
|
||||
assert result.status == ToolResultStatus.SUCCESS
|
||||
assert "found" in result.output
|
||||
|
||||
Reference in New Issue
Block a user