feat: add review_pending_changes tool and enforce absolute path security
- Add new review_pending_changes tool for comprehensive pre-commit reviews - Implement filesystem sandboxing with MCP_PROJECT_ROOT - Enforce absolute paths for all file/directory operations - Add comprehensive git utilities for repository management - Update all tools to use centralized path validation - Add extensive test coverage for new features and security model - Update documentation with new tool and path requirements - Remove obsolete demo and guide files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,7 @@ class TestThinkingModes:
|
||||
tool = AnalyzeTool()
|
||||
result = await tool.execute(
|
||||
{
|
||||
"files": ["test.py"],
|
||||
"files": ["/absolute/path/test.py"],
|
||||
"question": "What is this?",
|
||||
"thinking_mode": "minimal",
|
||||
}
|
||||
@@ -80,7 +80,9 @@ class TestThinkingModes:
|
||||
mock_create_model.return_value = mock_model
|
||||
|
||||
tool = ReviewCodeTool()
|
||||
result = await tool.execute({"files": ["test.py"], "thinking_mode": "low"})
|
||||
result = await tool.execute(
|
||||
{"files": ["/absolute/path/test.py"], "thinking_mode": "low"}
|
||||
)
|
||||
|
||||
# Verify create_model was called with correct thinking_mode
|
||||
mock_create_model.assert_called_once()
|
||||
@@ -129,7 +131,7 @@ class TestThinkingModes:
|
||||
tool = AnalyzeTool()
|
||||
await tool.execute(
|
||||
{
|
||||
"files": ["complex.py"],
|
||||
"files": ["/absolute/path/complex.py"],
|
||||
"question": "Analyze architecture",
|
||||
"thinking_mode": "high",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user