MCP Gateway rejects digest-pinned container images: embedded JSON schema disagrees with containerPattern
维护者通常 1 天内回复
评估
调研方向
从 internal/config/schema/mcp-gateway-config.schema.json 中服务器的 container 模式开始,并将其与 internal/config/validation_rules.go 中的 containerPattern 进行比较,后者已经接受可选的 @sha256 后缀。将相同的摘要分组追加到 schema 模式中,然后在 internal/config/validation_schema_test.go 中添加测试用例,证明两种摘要形式都能通过,而短摘要会失败。当固定摘要的配置能够加载,并且无效镜像仍被拒绝时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Analysis
The MCP Gateway (github/gh-aw-mcpg, v0.4.33) rejects digest-pinned server images, so MCP server images cannot be pinned by digest from a workflow. gh-aw's workflow schema allows container: name:tag@sha256:<64 hex>, so it compiles, then fails at gateway startup.
In gh-aw-mcpg the two validators disagree:
internal/config/validation_rules.go:containerPatternends with(@sha256:[a-fA-F0-9]{64})?(accepts digests;validation_string_patterns_test.gohas digest cases as valid).internal/config/schema/mcp-gateway-config.schema.json(embedded, applied to the stdin config): the servercontainerpattern ends with(:([a-zA-Z0-9._-]+|latest))?$, no digest. Unchanged from v0.4.28 to v0.4.33.
Reproduce with ghcr.io/github/gh-aw-mcpg:v0.4.33 and an identical minimal config, changing only container:
ghcr.io/github/github-mcp-server:v1.0.0: accepted....:v1.0.0@sha256:<64 hex>and...@sha256:<64 hex>:failed to load config: ... jsonschema validation failed ... Location: <root>.
Implementation Plan (in github/gh-aw-mcpg)
internal/config/schema/mcp-gateway-config.schema.json: append(@sha256:[a-fA-F0-9]{64})?to the servercontainerpattern(s), matchingcontainerPattern.- Tests (
internal/config/validation_schema_test.go): both digest forms pass schema validation; a short digest fails. - Run
make agent-finishedbefore completing.
Acceptance Criteria
A config whose server container is name:tag@sha256:<64 hex> or name@sha256:<64 hex> loads and launches on the gateway; invalid images are still rejected.
- 主要语言
- Go
- 星标
- 5.4k
- 派生
- 596
- 平均合并
- 3 小时 40 分钟
- 30 天内合并 PR
- 830
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/gh-aw 的其他 Issue
-
automation models
难度 1/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
automated-analysis code-quality cookie testing
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
automated conformance safe-outputs
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
automated conformance safe-outputs
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
wgdonenotdeferred: parenthesized Done() statement escapes non-deferred detection (paren_unwrap_gap)未关闭cookie sergo
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
keyxmakerx/Chronicle#1721 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
Gentleman-Programming/gentle-ai#5720 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
ClickHouse/ch-go#1218 ·
维护者通常 13 天内回复
-
effort:s impact:low raised-by:reviewer risk:low
难度 1/5 1 小时以内 新手友好度 84/100
medici-finance/assay#4251 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
Edwin-metcalf/MetCode#30 ·
维护者通常 1 天内回复