Skip to content

fix(deps): 修复 Dependabot 安全告警(pnpm overrides)#135

Merged
m1ngsama merged 2 commits into
mainfrom
fix/security-dependabot-2026-06
Jun 16, 2026
Merged

fix(deps): 修复 Dependabot 安全告警(pnpm overrides)#135
m1ngsama merged 2 commits into
mainfrom
fix/security-dependabot-2026-06

Conversation

@m1ngsama

Copy link
Copy Markdown
Member

背景

Dependabot/pnpm audit 报告了一批安全告警(含邮件提到的 vite High)。本 PR 在不引入破坏性变更的前提下修掉绝大多数。

改动

  • vite:直接 devDependency 8.0.5 → 8.0.16(修 8.x 告警)
  • mermaid11.14.0 → 11.15.0(CSS/HTML 注入)。显式声明为直接依赖,并用作用域 override 强制 vitepress-plugin-mermaid 的 peer 一并升级
  • pnpm.overrides 锁定同 major 的传递依赖补丁(均为 dev/构建期):
    lodash 4.18.1 · js-yaml 4.2.0 · markdown-it 14.2.0 · yaml 2.8.3 · picomatch 4.0.4 · ajv 6.14.0 · flatted 3.4.2 · minimatch 3.1.4 / 9.0.7 · brace-expansion 1.1.13 / 2.0.3

效果

pnpm audit34 → 7 个告警(high 14→3 / moderate 19→3 / low 1→1)。

暂未处理(需后续决策)

剩余 7 项全部是 dev-server / 构建工具链,不进入部署的静态产物:

  • 传递 vite@5.4.21(vitepress 1.6.4 自带,含 server.fs.deny 绕过 High):唯一补丁 6.4.3 与 vitepress 的 vite ^5.4.14 冲突,根治需升级 vitepress 2.0(仍为 alpha,破坏性)。仅影响 vitepress dev + Windows。
  • esbuild:High 那条是 Deno 安装场景(NPM_CONFIG_REGISTRY)专属,本项目用 pnpm/Node 不触发;且 esbuild 0.27.7 是 vite 8 的 peer,强升会破坏 vite 8。

验证

  • pnpm docs:build 构建成功
  • pnpm test 26/26 通过

Resolve the bulk of open Dependabot/audit security advisories without
breaking changes:

- vite: bump direct devDependency 8.0.5 -> 8.0.16 (fixes 8.x advisory)
- mermaid: 11.14.0 -> 11.15.0 (CSS/HTML injection); declared explicitly
  and forced for the vitepress-plugin-mermaid peer
- pnpm.overrides pin same-major patched versions for transitive deps:
  lodash 4.18.1, js-yaml 4.2.0, markdown-it 14.2.0, yaml 2.8.3,
  picomatch 4.0.4, ajv 6.14.0, flatted 3.4.2, minimatch 3.1.4/9.0.7,
  brace-expansion 1.1.13/2.0.3

Audit: 34 -> 7 advisories. Remaining 7 (transitive vite 5.x from
vitepress 1.6.4 and its esbuild) are dev-server-only and cannot be
patched without upgrading to vitepress 2.0 (alpha); deferred.

Verified: pnpm docs:build OK, vitest 26/26 pass.
@m1ngsama m1ngsama requested a review from Orangedog433 as a code owner June 16, 2026 01:42
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploying documents with  Cloudflare Pages  Cloudflare Pages

Latest commit: 99e1cdf
Status: ✅  Deploy successful!
Preview URL: https://b87320ea.documents-dq4.pages.dev
Branch Preview URL: https://fix-security-dependabot-2026.documents-dq4.pages.dev

View logs

Reconcile with Dependabot PR #134 (vite ^8.0.16 already on main).
Re-apply pnpm.overrides + mermaid dep, regenerate lockfile.
Verified: docs:build OK, vitest 26/26, audit 7 (down from 34).
@m1ngsama m1ngsama merged commit 730a3cc into main Jun 16, 2026
5 checks passed
@m1ngsama m1ngsama deleted the fix/security-dependabot-2026-06 branch June 16, 2026 01:51
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