tree-sitter-analyzer 0.8.2__py3-none-any.whl → 0.8.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tree-sitter-analyzer might be problematic. Click here for more details.
- tree_sitter_analyzer/__init__.py +1 -1
- tree_sitter_analyzer/cli/commands/base_command.py +3 -1
- tree_sitter_analyzer/mcp/server.py +10 -0
- tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py +677 -673
- tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py +4 -9
- tree_sitter_analyzer/project_detector.py +317 -317
- tree_sitter_analyzer/security/__init__.py +22 -22
- tree_sitter_analyzer/security/boundary_manager.py +44 -2
- tree_sitter_analyzer/security/regex_checker.py +292 -292
- tree_sitter_analyzer/security/validator.py +5 -2
- {tree_sitter_analyzer-0.8.2.dist-info → tree_sitter_analyzer-0.8.3.dist-info}/METADATA +7 -6
- {tree_sitter_analyzer-0.8.2.dist-info → tree_sitter_analyzer-0.8.3.dist-info}/RECORD +14 -14
- {tree_sitter_analyzer-0.8.2.dist-info → tree_sitter_analyzer-0.8.3.dist-info}/WHEEL +0 -0
- {tree_sitter_analyzer-0.8.2.dist-info → tree_sitter_analyzer-0.8.3.dist-info}/entry_points.txt +0 -0
tree_sitter_analyzer/__init__.py
CHANGED
|
@@ -47,7 +47,9 @@ class BaseCommand(ABC):
|
|
|
47
47
|
return False
|
|
48
48
|
|
|
49
49
|
# Security validation
|
|
50
|
-
is_valid, error_msg = self.security_validator.validate_file_path(
|
|
50
|
+
is_valid, error_msg = self.security_validator.validate_file_path(
|
|
51
|
+
self.args.file_path, base_path=self.project_root
|
|
52
|
+
)
|
|
51
53
|
if not is_valid:
|
|
52
54
|
output_error(f"Invalid file path: {error_msg}")
|
|
53
55
|
return False
|
|
@@ -77,6 +77,16 @@ class TreeSitterAnalyzerMCPServer:
|
|
|
77
77
|
|
|
78
78
|
self.analysis_engine = get_analysis_engine(project_root)
|
|
79
79
|
self.security_validator = SecurityValidator(project_root)
|
|
80
|
+
# Ensure boundary manager exposes the exact provided project_root for consistency in tests/environments
|
|
81
|
+
try:
|
|
82
|
+
import os as _os
|
|
83
|
+
if self.security_validator.boundary_manager and project_root:
|
|
84
|
+
provided_root = _os.path.abspath(project_root)
|
|
85
|
+
self.security_validator.boundary_manager.project_root = provided_root
|
|
86
|
+
# Keep allowed directories in sync with the exposed project_root
|
|
87
|
+
self.security_validator.boundary_manager.allowed_directories = {provided_root}
|
|
88
|
+
except Exception:
|
|
89
|
+
pass
|
|
80
90
|
# Use unified analysis engine instead of deprecated AdvancedAnalyzer
|
|
81
91
|
|
|
82
92
|
# Initialize MCP tools with security validation
|