Repository navigation
Security release for issue #19 (CWE-22, arbitrary file read via git_read_important_files).
Fixed
- Path confinement: every
file_pathsentry is resolved withrealpathand must stay inside the clone. Absolute paths,..segments and symlinks shipped inside a repo (README.md -> ~/.ssh/id_ed25519) are now refused. .git/refused —configcan carry credentials from the clone URL.- Size cap: one file at most 512 KiB (
MCP_GIT_INGEST_MAX_FILE_BYTESoverrides) instead of reading multi-GB files into memory. repo_urlvalidation:https://,ssh://or scp-style only;file://,ext::, local paths and leading-refused. OptionalMCP_GIT_INGEST_ALLOWED_HOSTSallowlist.git_directory_structureno longer recurses into symlinks (a repo could point one at/and stall the server).- Dropped the removed
FastMCP(dependencies=...)kwarg: the server imports again on currentfastmcp(4.x).requires-pythonis now>=3.10.
Upgrade: uvx --from git+https://github.com/adhikasp/mcp-git-ingest mcp-git-ingest already tracks main; pin @v0.1.1 if you want the tag.
Tests: 32 new pytest cases (uv run --extra test pytest).