Skip to content

build(deps): update Node, ws and the runtime image for new advisories - #18

Merged
TN019 merged 6 commits into
mainfrom
chore/security-refresh
Dec 1, 2026
Merged

TN019 merged 6 commits into
mainfrom
chore/security-refresh

Conversation

@TN019

@TN019 TN019 commented Dec 1, 2026

Copy link
Copy Markdown

Why

The Trivy step in CI now fails on the container image. New high-severity advisories cover the Debian 12 packages in the node:26.12.1-bookworm-slim base image, the npm copy that ships with Node (brace-expansion 5.0.9, undici 6.28.0) and ws 8.18.3 in the bridge.

What changed

  • Update ws from 8.18.3 to 8.21.0 (CVE-2026-48779). The bridge uses WebSocketServer, send and readyState, which are unchanged.
  • Update Node from 26.12.1 to 26.13.1 in .nvmrc, engines, both READMEs and both Dockerfile stages. The pinned image was built on 2026-11-24 from the current Debian 12 slim base.
  • Delete npm and npx in the runtime stage (brace-expansion CVE-2026-102276, undici CVE-2026-109383). The bridge starts with node; the build stage keeps npm to install pnpm.
  • Upgrade installed Debian packages in the runtime stage. The base image still had libpam 1.5.2-6+deb12u2 (CVE-2025-6020) and libzstd1 1.5.4+dfsg2-5 (CVE-2026-124851), which Debian has fixed.
  • Set ignore-unfixed: true on the Trivy step, as the Gatepost release scan already does. The 33 findings left in the Debian 12 base are marked affected, fix deferred or will not fix, so no update can clear them. High and critical findings with a fixed version still fail CI.
  • Add an Unreleased entry to both changelogs.

How to verify

pnpm install --frozen-lockfile
pnpm lint
pnpm typecheck
pnpm test
pnpm build
docker build -t gatepost-sim:check .
docker run --rm --entrypoint sh gatepost-sim:check -c 'command -v npm || echo "npm not installed"'

The last command prints npm not installed. CI runs the browser test, the SBOM and the Trivy scan on the same image.


背景

CI 中的 Trivy 扫描现在在容器镜像上失败。新公布的高危漏洞涉及 node:26.12.1-bookworm-slim 基础镜像里的 Debian 12 软件包、Node 自带的 npm(brace-expansion 5.0.9、undici 6.28.0),以及 bridge 使用的 ws 8.18.3。

改动

  • ws 从 8.18.3 升到 8.21.0(CVE-2026-48779)。bridge 用到的 WebSocketServer、send 和 readyState 没有变化。
  • Node 从 26.12.1 升到 26.13.1,涉及 .nvmrc、engines、中英文 README 和 Dockerfile 的两个阶段。固定的镜像构建于 2026-11-24,基于当前的 Debian 12 slim。
  • 运行阶段删去 npm 和 npx(brace-expansion CVE-2026-102276、undici CVE-2026-109383)。bridge 直接用 node 启动;构建阶段仍保留 npm,用来安装 pnpm。
  • 运行阶段升级已安装的 Debian 软件包。基础镜像里仍是 libpam 1.5.2-6+deb12u2(CVE-2025-6020)和 libzstd1 1.5.4+dfsg2-5(CVE-2026-124851),Debian 已发布修复版本。
  • Trivy 步骤设置 ignore-unfixed: true,与 Gatepost 发布扫描一致。Debian 12 基础镜像里剩下的 33 条漏洞状态为 affected、fix deferred 或 will not fix,升级无法清除。有修复版本的高危和严重漏洞仍会让 CI 失败。
  • 在中英文更新记录中加入“未发布”条目。

怎么验证

pnpm install --frozen-lockfile
pnpm lint
pnpm typecheck
pnpm test
pnpm build
docker build -t gatepost-sim:check .
docker run --rm --entrypoint sh gatepost-sim:check -c 'command -v npm || echo "npm not installed"'

最后一条命令输出 npm not installed。CI 会在同一个镜像上运行浏览器测试、生成 SBOM 并做 Trivy 扫描。

Yuki Tanaka added 6 commits November 30, 2026 14:10
ws 8.18.3 is affected by CVE-2026-48779 (high). 8.21.0 is the first fixed
8.x release. The bridge uses WebSocketServer, send and readyState, which
8.21.0 keeps unchanged; the bridge tests pass.
Move .nvmrc, the engines field, the README and both Dockerfile stages to
Node 26.13.1. The pinned node:26.13.1-bookworm-slim image was built on
2026-11-24 from the current Debian 12 slim base, so it includes the Debian
security updates published since the 26.12.1 image of 2026-10-28.
The node base image ships npm 11.20.0 with brace-expansion 5.0.9
(CVE-2026-102276) and undici 6.28.0 (CVE-2026-109383). Node 26.13.1
bundles the same npm. The runtime stage starts the bridge with node and
never calls npm or npx, so delete them there; the build stage keeps npm
to install pnpm.
The node:26.13.1-bookworm-slim image still has libpam 1.5.2-6+deb12u2
(CVE-2025-6020) and libzstd1 1.5.4+dfsg2-5 (CVE-2026-124851); Debian has
published fixed packages for both. Upgrade installed packages in the
runtime stage, as the Gatepost build image does, and note it in the
changelogs.
The remaining findings in the Debian 12 base are marked affected, fix
deferred or will not fix, so no package update can clear them and every
pull request would fail. Ignore unfixed findings, as the Gatepost release
scan already does; high and critical findings with a fixed version still
fail CI.
@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Mateo Rossi · reviewer

Does anything in the runtime container still call npm or npx, for example the health check or the entrypoint?


运行容器里还有地方调用 npm 或 npx 吗?比如健康检查或入口脚本。

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Yuki Tanaka · author

No. The entrypoint runs setpriv and node, and the health check runs node -e. npm stays in the build stage, where it installs pnpm.


没有。入口脚本运行 setpriv 和 node,健康检查运行 node -e。npm 只留在构建阶段,用来安装 pnpm。

@TN019
TN019 merged commit 6542053 into main Dec 1, 2026
1 check passed
@TN019
TN019 deleted the chore/security-refresh branch December 1, 2026 00:18
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