Skip to content

fix(security): 修复 Dependabot 安全告警 (pgx + 前端依赖)#414

Merged
tbphp merged 2 commits intomainfrom
fix/security-deps
May 5, 2026
Merged

fix(security): 修复 Dependabot 安全告警 (pgx + 前端依赖)#414
tbphp merged 2 commits intomainfrom
fix/security-deps

Conversation

@tbphp
Copy link
Copy Markdown
Owner

@tbphp tbphp commented May 5, 2026

Summary

闭环当前 GitHub Dependabot 全部 8 条 open 告警,并附带修复本地 npm audit 多发现的 4 条 npm 漏洞,共 12 条。

  • 后端github.com/jackc/pgx/v5 5.6.0 → 5.9.2,闭环 CVE-2026-33816(critical, 内存安全)与 CVE-2026-41889(low, dollar-quoted SQL 注入)。pgx v5.9.x 要求 go 1.25.0,因此一并把 go.mod、3 份 release workflow(go-version: 1.25.x)和 Dockerfilegolang:1.25-alpine)的 Go 版本声明从 1.24 抬到 1.25。
  • 前端:仅通过 npm audit fix(不带 --force)在 semver 范围内更新 web/package-lock.jsonweb/package.json 未变。关键升级:rollup 4.57→4.60(路径穿越)、vite 6.4.1→6.4.2(路径穿越 + WS 任意文件读)、minimatch 3.1.2/9.0.5→3.1.5/9.0.9(ReDoS)、picomatch 2.3.1/4.0.3→2.3.2/4.0.4(方法注入 + ReDoS)、flatted 3.3.3→3.4.2(原型污染)、lodash/lodash-es 4.17.23→4.18.1(模板注入 + 原型污染)、postcss 8.5.6→8.5.14(XSS)。

验证

  • go build ./... exit 0
  • go vet ./... exit 0
  • go test ./... 通过(仓库目前无 Go 测试用例)
  • npm audit found 0 vulnerabilities
  • npm run build exit 0,dist 产物大小与既有一致
  • npm run lint:check exit 0
  • npm run type-check exit 0

Test plan

  • CI release workflow 在 Go 1.25.x 下成功构建 linux / macos / windows 产物
  • Docker 镜像基于 golang:1.25-alpine 成功构建
  • 前端关键页面(登录、Dashboard、Keys、Logs、Settings)肉眼回归无异常
  • 合入后 Dependabot 上的 8 条 open 告警自动关闭

备注

  • 不涉及业务逻辑代码改动,UI 行为应保持不变。
  • Code Scanning 与 Secret Scanning 历史告警此前已被维护者 dismiss/resolve,本 PR 未触碰。
  • Go 工具链升级到 1.25 是 pgx 修补的传递性必要前置,没有可绕过的修补分支。

tbphp added 2 commits May 5, 2026 09:10
修复 GHSA-9jj7-4m8r-rfcm (CVE-2026-33816, critical, 内存安全)
和 GHSA-j88v-2chj-qfwx (CVE-2026-41889, low, SQL 注入)。

pgx v5.9.x 要求 go 1.25.0,因此一并把 go.mod、CI 工作流、
Dockerfile 中的 Go 版本声明从 1.24 抬到 1.25。
通过 npm audit fix 在 semver 范围内升级 lockfile,未改 package.json:
- rollup 4.57→4.60 修复路径穿越文件写入 (GHSA-mw96-cpmx-2vgc)
- vite 6.4.1→6.4.2 修复路径穿越与 WS 文件读取
- minimatch 3.1.2/9.0.5→3.1.5/9.0.9 修复 ReDoS
- picomatch 2.3.1/4.0.3→2.3.2/4.0.4 修复方法注入与 ReDoS
- flatted 3.3.3→3.4.2 修复原型污染
- lodash/lodash-es 4.17.23→4.18.1 修复模板注入与原型污染
- postcss 8.5.6→8.5.14 修复 XSS

npm audit 已确认 0 vulnerabilities。
@tbphp tbphp self-assigned this May 5, 2026
@tbphp tbphp added the bug Something isn't working label May 5, 2026
@tbphp tbphp added this to the v1.4.7 milestone May 5, 2026
@tbphp tbphp merged commit 275cc50 into main May 5, 2026
5 checks passed
@tbphp tbphp deleted the fix/security-deps branch May 5, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant