Skip to content

v0.5.0 — Production Hardening (2026-07-05)

Choose a tag to compare

@DeliciousBuding DeliciousBuding released this 05 Jul 07:40

v0.5.0 — 2026-07-05

🔒 Security

  • Admin/proxy token 比较改用 crypto/subtle.ConstantTimeCompare(防时序攻击)
  • CI 启用 errcheckstaticcheckineffassign linter + -race 检测
  • /debug/vars 移至 admin auth 保护后
  • 安全响应头中间件:X-Content-Type-Options, X-Frame-Options, Referrer-Policy, CSP
  • AES 密钥派生独立默认值,不再 fallback 到 AUTH_TOKEN

🐛 Fixed

  • 代理出口 http.DefaultClient(零超时)→ RuntimeExecutor(90s fallback)
  • 6 处 OAuth panic → return error
  • SSE WriteTimeout 60s 截流 → SetWriteDeadline 禁用
  • 13 处 log.Printf → slog
  • DB 连接池 ConnMaxLifetime + ConnMaxIdleTime
  • usage_aggregation re-panic + CheckinScheduler data race 修复
  • CI golangci-lint Go 1.25 兼容

✨ Added

  • /metrics Prometheus 端点 · RequestID 中间件 · APIError 类型
  • pre-push git hook (.githooks/pre-push) · Claude Code push guard
  • AGENTS.md CI Discipline 规范

🧪 Tests

  • 8 零覆盖包补齐(最低 50%,最高 100%)· +3 e2e 场景