Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

MCP Gateway rejects digest-pinned container images: embedded JSON schema disagrees with containerPattern

已关闭 适合新手
#69,405 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@pelikhan 已经在做这个了。

开始于 2026年10月18日。

  • #69997 来自 @copilot-swe-agent —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
docker, go
领域
backend

调研方向

从 internal/config/schema/mcp-gateway-config.schema.json 中服务器的 container 模式开始,并将其与 internal/config/validation_rules.go 中的 containerPattern 进行比较,后者已经接受可选的 @sha256 后缀。将相同的摘要分组追加到 schema 模式中,然后在 internal/config/validation_schema_test.go 中添加测试用例,证明两种摘要形式都能通过,而短摘要会失败。当固定摘要的配置能够加载,并且无效镜像仍被拒绝时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

ai-inspected
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: containerPattern ends with (@sha256:[a-fA-F0-9]{64})? (accepts digests; validation_string_patterns_test.go has digest cases as valid).
  • internal/config/schema/mcp-gateway-config.schema.json (embedded, applied to the stdin config): the server container pattern 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)
  1. internal/config/schema/mcp-gateway-config.schema.json: append (@sha256:[a-fA-F0-9]{64})? to the server container pattern(s), matching containerPattern.
  2. Tests (internal/config/validation_schema_test.go): both digest forms pass schema validation; a short digest fails.
  3. Run make agent-finished before 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

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/gh-aw 的其他 Issue

查看 github/gh-aw 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。