MCP scan allowlist ignores `tool:` field, so entries apply server-wide
维护者通常 11 天内回复
还没有人认领这个 Issue。
评估
调研方向
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 内容生成。
描述
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.yamlhas eight separateAISubtech-12.1.2entries, 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'sreasonsurvives into the scan output.- Prefix matching widens this further. An
AITech-12.1entry also covers everyAISubtech-12.1.xon 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 onexecute_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 whosetool_nameequals it. Entries withouttoolkeep today's server-wide behavior, so existing specs withouttool:don't change. - Keep each matched entry's own
reasonin the output. - Add tests for per-tool matching, duplicate codes across tools, and the no-
toolfallback.
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 小时
- 30 天内合并 PR
- 74
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stacklok/dockyard 的其他 Issue
-
grype high security
难度 2/5 1-3 小时 新手友好度 53/100
维护者通常 11 天内回复
-
grype high security
难度 2/5 1-3 小时 新手友好度 56/100
维护者通常 11 天内回复
-
Package Postman with proxy-compatible Node可能重新可做 关联的 PR 已关闭且未合并。 未关闭needs-triage
难度 4/5 3-5 天 新手友好度 48/100
stacklok/dockyard#1195 · 1 条评论 ·
维护者通常 11 天内回复
-
grype high security
难度 2/5 1-3 小时 新手友好度 52/100
stacklok/dockyard#1191 · 3 条评论 ·
维护者通常 11 天内回复
-
grype high security
难度 3/5 1-2 天 新手友好度 52/100
stacklok/dockyard#1189 · 3 条评论 ·
维护者通常 11 天内回复
查看 stacklok/dockyard 的全部 Issue
相似的 Issue
-
type/bug
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
messaging/v1: IsGRPCProtocol and InternalMetadataToGrpcMetadata panic on empty or nil metadata values可能已有人在做 @patelshivani2283-lab 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 62/100
stacklok/toolhive-catalog#2024 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复