Skip to content

build: upgrade Go to 1.27.4 for net/http security fix - #8670

Closed
r266-tech wants to merge 1 commit into
Wei-Shaw:mainfrom
r266-tech:codex/go1274-security
Closed

r266-tech wants to merge 1 commit into
Wei-Shaw:mainfrom
r266-tech:codex/go1274-security

Conversation

@r266-tech

Copy link
Copy Markdown
Contributor

当前 backend/go.mod 固定 Go 1.27.3,fresh govulncheck 已命中今天公布的 GO-2026-6859(net/http 的 HTTP/1 MaxBytesReader header race),修复版本为 Go 1.27.4。此问题已阻断 #8669 等 PR 的 backend-security。

同步 Go 模块最低版本、CI/release 的四处版本断言、三个 Docker Go 构建镜像及开发/README 版本说明到 1.27.4。官方 golang:1.27.4-alpine 多平台 manifest 已读回,包含 amd64 和 arm64。

完整验证暴露了既有 keepalive 测试的调度依赖:固定等待 55ms 后关闭流,却要求三次 15ms keepalive。该用例改为先等待三次真实写入,再关闭流,并保留原来的 >= 3 ping 断言。给 handler 协程注入相同 50ms 启动延迟时,旧测试失败,修正后连续 10 次通过。

验证(Go 1.27.4 / macOS arm64):

  • 未改 main / Go 1.27.3:govulncheck ./... 返回 3,命中 GO-2026-6859;最终树 / Go 1.27.4:同一 scanner v1.9.0 和数据库返回 0、0 个可达漏洞。原报告仍列出 6 个未调用的依赖模块漏洞。
  • go test -p=2 -tags=unit ./... -json:26,879 通过、41 条件跳过。
  • go test -p=2 -tags=integration ./... -json:16,143 通过、16 条件跳过。修正前的完整 integration 唯一失败即上述 55ms 用例,原始失败及受控对照均已保留。
  • CI 固定 golangci-lint v2.14.0:0 issues;git diff --check 通过。
  • 原样发布矩阵及 Docker 命令夹具:Linux / Bash 5.2.37、锁定 PyYAML 6.0.3 下 10 项通过;夹具使用 mock Docker 记录命令。

实现与本地验证由 AI 完成。

doublepi123 added a commit to doublepi123/sub2api that referenced this pull request Nov 12, 2026
Merges 267e2a9 (single commit on top of 530c5e3, fork main's
upstream parent) with --no-ff so the PR author's history is preserved.

Conflict resolutions:
- .github/workflows/release.yml: keep the fork's single-job publication
  flow and its fork-scoped cache step, only take the 1.27.4 assertion.
- backend/Dockerfile, deploy/Dockerfile: take golang:1.27.4-alpine.

Also carries the PR's keepalive-test fix: wait for three real writes
instead of a fixed 55ms sleep, keeping the `>= 3` ping assertion.
doublepi123 added a commit to doublepi123/sub2api that referenced this pull request Nov 12, 2026
The fork-only Docker Hub publication workflow pins the Go build image
through a build-arg outside upstream PR Wei-Shaw#8670's file list. Without this
bump it would keep compiling with Go 1.27.3 and ship the unfixed
net/http (GO-2026-6859) binary even after go.mod and the three
Dockerfiles moved to 1.27.4.
riofutab added a commit to riofutab/sub2api that referenced this pull request Nov 13, 2026
riofutab added a commit to riofutab/sub2api that referenced this pull request Nov 13, 2026
- Claude 链路:令牌轮换后 401 同账号重试,per-turn beta 保留轮次输出配置,Stainless 版本头与抬升后的 UA 对齐(Wei-Shaw#8737 Wei-Shaw#8742 Wei-Shaw#8731 Wei-Shaw#8726 Wei-Shaw#8724 Wei-Shaw#8698)。
- Codex/OpenAI 链路:Desktop 独立上下文原样转发并删除 fork 的 bootstrap 扫描器,分叉会话沿用父会话缓存键,刷新后的令牌在补充信息超时时仍保存(Wei-Shaw#8680 Wei-Shaw#8664 Wei-Shaw#8671 Wei-Shaw#8735 Wei-Shaw#8682 Wei-Shaw#8703)。
- 构建:Go 升到 1.27.4 修复 GO-2026-6859(Wei-Shaw#8670);前端 Gemini 用量条刷新不再跳动(Wei-Shaw#8740)。
- fork 带的 Wei-Shaw#8034 测试改为断言轮换后的凭据被保存,并为测试桩补齐 CAS 方法。
- 后端全量 unit、golangci-lint、前端 lint/typecheck/账号组件测试通过;repository 集成测试未跑。
@r266-tech

Copy link
Copy Markdown
Contributor Author

核对新版 #8767(a2932149)后,其 8 个工具链文件与本 PR 的最终 blob 完全相同,且全部有效 CI 已成功,因此关闭本重复 PR,集中工具链评审到 #8767。这里的 keepalive 调度修复已在独立测试 PR #8756 保留;其余差异仅为三个 README 的 Go 版本说明。原分支和验证记录继续保留。AI 辅助核对。

@r266-tech r266-tech closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant