docs(git): clarify unconfined default scope and repository confinement options in README and CLI
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 73/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- cli, documentation, security
Línea de trabajo
Lee src/git/README.md en Configuration y revisa la opción --repository en src/git/src/mcp_server_git/__init__.py. Actualiza la advertencia del README y la ayuda de la CLI para explicar que omitir la opción permite acceder a todos los repositorios accesibles; documenta el comportamiento de None en src/git/src/mcp_server_git/server.py y comprueba la aserción de ayuda en src/git/tests/test_entrypoints.py. El trabajo estará terminado cuando estas partes expliquen la limitación de forma coherente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Server:git (mcp-server-git)
Server Version / Environment:
- Version:
2026.10.19(Python SDK>=2.3,<3) - Transport:
stdio - OS: Linux / macOS / Windows
Description & Motivation:
In mcp-server-git, tools accept repo_path (e.g., git_status, git_diff, git_commit, etc.).
When --repository <path> is passed at startup, validate_repo_path() rejects any tool calls outside the allowed repository root.
However, when launched without --repository (such as in standard client configurations like uvx mcp-server-git), allowed_repository defaults to None. In this mode, validate_repo_path() is a no-op, allowing any tool call to access and mutate any reachable Git repository across the host filesystem under the running user's process privileges (as pinned by test_without_repository_any_repository_is_reachable under #4550).
While this multi-repository reach is an intentional architectural capability, it is not prominently communicated to users in either the CLI --help or README.md. Users configuring the server may assume it is scoped only to the workspace or current directory.
Prompt Used to Generate the Change:
In src/git, clarify that omitting --repository leaves the server in unconfined mode where all reachable repositories on the filesystem are accessible to tool calls.
1. In src/git/README.md, add an official GitHub alert (> [!WARNING]) under Configuration explaining that without --repository, every reachable Git repository is in scope, and describe how to confine operations via --repository <path>.
2. In src/git/src/mcp_server_git/__init__.py, update the Click option help text for --repository to: 'Git repository path to confine operations to. Without this option, every reachable repository is in scope.'
3. In src/git/src/mcp_server_git/server.py, update validate_repo_path's docstring to document the None behavior.
4. In src/git/tests/test_entrypoints.py, update test_main_help to assert that the confinement message is present in --help output.
Behavior Before vs. After:
| Surface | Before | After |
|---|---|---|
mcp-server-git --help |
-r, --repository PATH Git repository path |
-r, --repository PATH Git repository path to confine operations to. Without this option, every reachable repository is in scope. |
src/git/README.md |
Generic text mentioning --repository resolves to top-level |
High-visibility GitHub alert > [!WARNING] detailing unconfined vs confined modes |
server.py docstring |
Did not mention allowed_repository=None |
Explicitly states: "When allowed_repository is None, no restriction is configured and any reachable repository on the filesystem is permitted." |
test_entrypoints.py |
Tested presence of -r, --repository |
Asserts confine operations to in output |
Verification Steps:
- Ran
python -m pytest tests/test_entrypoints.py -k test_main_help➡️ PASSED - Verified
mcp_server_git --helpoutput renders formatted lines cleanly. - Verified
test_main_without_repository_serves_noneandtest_python_dash_m_calls_main➡️ PASSED.
- Lenguaje dominante
- TypeScript
- Estrellas
- 91.4k
- Forks
- 11.8k
- Merge medio
- 6 h 39 min
- PR fusionados (30 d)
- 146
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/servers
-
Clear the four CodeQL alerts in the release scripts (replaceAll for %2F, comment-line check)Abiertochore v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
modelcontextprotocol/servers#5261 ·
Los mantenedores suelen responder en 1 día
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
modelcontextprotocol/servers#5230 ·
Los mantenedores suelen responder en 1 día
-
git: README should state plainly that without --repository every reachable repository is in scopeAbiertodocumentation server-git v2
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
modelcontextprotocol/servers#5225 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
chore v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
modelcontextprotocol/servers#5223 ·
Los mantenedores suelen responder en 1 día
-
bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
modelcontextprotocol/servers#5217 ·
Los mantenedores suelen responder en 1 día
Todos los issues de modelcontextprotocol/servers
Issues similares
-
[good first issue, hacktoberfest] 🏯 Hacktoberfest Task - Add new Japan Fact 898 (good-first-issue)Abiertocommunity first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
lingdojo/kana-dojo#33145 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
code-yeongyu/senpi#4278 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Activity | The activity list ignores taskIds and returns the activities of every taskPosiblemente ocupada @NdekoCode la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ever-co/ever-gauzy#11469 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
griffinwork40/agent-afk#4408 ·
Los mantenedores suelen responder en 1 día