Repository navigation
Commit c2486da
fix(security): 升级 Node.js 运行时修复 CVE-2026-111497,前后端依赖升级到最新版本 (#1514)
Node.js 2026 年 10 月安全更新修复了 Brotli 解码越界写入漏洞 CVE-2026-111497(高危,可远程执行代码),
影响 22.x / 24.x / 26.x。CCH 在鉴权之前解压入站 `content-encoding: br` 请求体,因此必须运行包含修复的 Node。
运行时
- 生产镜像、开发镜像与根 Dockerfile 统一固定为 node:26.12.1-trixie-slim,Bun 固定为 1.4.3
- package.json engines 收紧为 ^22.23.4 || ^24.22.1 || >=26.12.1
- 新增 .node-version,dev / pr-check / release 工作流的 setup-node 统一读取该文件
- Dockerfile 契约测试校验所有 Node 镜像与 .node-version 一致且满足修复版本范围
依赖
- 全部前后端依赖升级到最新版本:Next.js 16.4.2、React 19.3.1、undici 8.12.3、Hono 4.13.13、
Langfuse SDK 6、Vitest 5、Biome 2.6、happy-dom 21、@lobehub/ui 6、@lobehub/icons 6、
@bull-board 9、framer-motion 14、dotenv 18 等
- @opentelemetry/sdk-node 使用 0.223.0:Langfuse 6 的 span processor 以 OTel 2.x
(@opentelemetry/sdk-trace-base ^2)为 peer,0.300.0 已切换到 OTel 3.x
- typescript 保持 6.0.3:openapi-typescript 7.13.0 仍依赖 TypeScript JS compiler API,
TypeScript 7 不提供该 API;类型检查使用 tsgo 与 typescript-7
- 补充直接依赖 swr(大屏页面使用,此前由 antd 间接带入)与 @lobehub/fluent-emoji 5(@lobehub/ui 6 的 peer)
适配
- Next.js 16.4 要求每个 page 都有根 layout:根路径改为 src/app/route.ts,按语言 cookie 跳转到 dashboard
- Langfuse 6 按 JSON 编码后的长度校验传播的 metadata,超过 200 字符会整个丢弃,
截断逻辑改为按编码后长度计算
- Biome 2.6 新增推荐规则 noComponentHookFactories / useMathMinMax:组件与 hook 移到模块级,
测试中的构造函数 mock 改为小写命名
- Vitest 5 移除 describe.sequential,改为 { concurrent: false };next-intl 交给 Vite 解析 next/navigation
验证
- bun run build / lint / format:check / typecheck / openapi:check / openapi:lint / validate:migrations 通过
- bun run test:924 个文件、9407 个测试全部通过(本机负载过高,使用 --testTimeout=120000 运行)
- 集成测试(PostgreSQL + Redis):11 个文件、93 个测试通过
- 本地构建 deploy/Dockerfile 镜像,容器内 Node 为 v26.12.1,用真实 PostgreSQL 与 Redis 启动,
验证迁移、登录、仪表盘、供应商与日志页面、管理 API、OpenAPI 与 Scalar、br / zstd 请求体以及损坏的 br 请求体
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 7436438 commit c2486da
48 files changed
Lines changed: 602 additions & 396 deletions
File tree
- .github/workflows
- deploy
- src
- app
- [locale]/dashboard
- logs/_hooks
- sessions
- [sessionId]/messages/_components
- _components
- v1/_lib/proxy
- components/ui
- i18n
- lib/langfuse
- tests
- integration
- load/issue-1408-replay-oom
- security
- unit
- api
- app
- drizzle
- frontend
- langfuse
- lib
- log-cleanup
- redis
- settings/providers
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments