MCP scan allowlist ignores `tool:` field, so entries apply server-wide

オープン
#1,256 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 11 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
security, testing

調査の方向性

Start with scripts/mcp-scan/process_scan_results.py, especially load_security_config() and is_issue_allowed(), then inspect the scanner tests. Add coverage for per-tool matches, duplicate codes across tools, and entries without tool:. Done means tool-scoped entries only allow matching findings, server-wide entries retain their current behavior, and each match reports its own reason.

索引モデルが issue の本文から書いたものです。

説明

needs-triage

security.allowed_issues entries in MCP server specs commonly include a tool: field, which reads as scoping the entry to one tool. scripts/mcp-scan/process_scan_results.py never reads it. load_security_config() builds a dict keyed only by code (line 84), and is_issue_allowed() checks only the finding's AITech/AISubtech codes against that dict (lines 91-127). So every entry allowlists its code for every tool on the server, including tools added in future versions.

Impact

  • 7 specs use tool: across 17 entries (heroku, phoenix, sentry, server-everything, arxiv, clickhouse, redis). All of them are broader than they look.
  • npx/heroku-mcp-server/spec.yaml has eight separate AISubtech-12.1.2 entries, one per tool. They collapse into a single dict key, so 12.1.2 is allowlisted on every Heroku tool, and only the last entry's reason survives into the scan output.
  • Prefix matching widens this further. An AITech-12.1 entry also covers every AISubtech-12.1.x on every tool.
  • It makes narrow allowlists for LLM-analyzer flakes unsafe. For example, supabase's main build just failed on a nondeterministic AITech-8.2 (data exfiltration) finding on get_publishable_keys. Allowlisting that would also silence any future 8.2 finding on execute_sql.

Proposed fix

  • Store allowlist entries as a list of (code, tool, reason) rather than a dict keyed by code.
  • When an entry has tool, match only findings whose tool_name equals it. Entries without tool keep today's server-wide behavior, so existing specs without tool: don't change.
  • Keep each matched entry's own reason in the output.
  • Add tests for per-tool matching, duplicate codes across tools, and the no-tool fallback.

Rollout note

Turning this on will narrow 17 existing entries. A spec whose allowlist was quietly covering other tools could start failing its scan. Running the scanner over those 7 specs before merging would show which entries need to be widened or duplicated.

主要言語
Go
スター
8
フォーク
7
平均マージ
6日 15時間
マージ済み PR(30日)
74

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stacklok/dockyard のほかの issue

stacklok/dockyard の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。