docs(git): clarify unconfined default scope and repository confinement options in README and CLI
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 74/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- git, python
調査の方向性
src/git/README.mdのConfigurationセクションと、src/git/src/mcp_server_git/__init__.pyの--repositoryオプションを読みます。issueではsrc/git/src/mcp_server_git/server.pyとsrc/git/tests/test_entrypoints.pyも挙げられています。allowed_repository=Noneがリポジトリへのアクセスにどう影響するかを確認し、issueに記載された警告、CLIヘルプ、docstring、ヘルプのアサーションを更新します。これらの箇所でデフォルトではアクセスが制限されないことを説明し、対象を絞ったヘルプのテストが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 91.4k
- フォーク
- 11.8k
- 平均マージ
- 6時間 37分
- マージ済み PR(30日)
- 147
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/servers のほかの issue
-
chore v2
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
modelcontextprotocol/servers#5261 ·
メンテナーはふだん 1 日以内に返信
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
modelcontextprotocol/servers#5231 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
git: README should state plainly that without --repository every reachable repository is in scopeオープンdocumentation server-git v2
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
modelcontextprotocol/servers#5225 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
chore v2
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
modelcontextprotocol/servers#5223 ·
メンテナーはふだん 1 日以内に返信
-
bug v2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modelcontextprotocol/servers#5217 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/servers の issue をすべて見る
似ている issue
-
a10y a10y-audit ai-driven-qa claude
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
linagora/twake-directory-manager#219 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
0️⃣ phase/new
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Pulse v7: buildPreferencesFromTelos() bypasses telosSectionOrFile(), renders empty on unified-TELOS installs対応中かも @zephyr91 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2393 ·
メンテナーはふだん 4 日以内に返信