feat(files-mcp): scaffold package + path_guard sandbox

Adds the files_mcp/ sibling package and core/path_guard.py which
resolves arbitrary input paths and rejects any that escape the
FILES_MCP_ROOT sandbox (handles .., ~, symlinks, NUL, empty). Adds
tests/unit/test_path_guard.py covering accept, escape modes,
symlink escape, and _init_root failure paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-06-30 17:39:23 +08:00
co-authored by Claude Fable 5
parent d985883c20
commit d8d541f50d
4 changed files with 201 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
# coding=utf-8
"""
@Time :2026/6/30
@Author :tao.chen
"""