fix(deps): 修复 Dependabot 安全告警(pnpm overrides)#135
Merged
Conversation
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.
Deploying documents with
|
| 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 |
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Dependabot/
pnpm audit报告了一批安全告警(含邮件提到的 vite High)。本 PR 在不引入破坏性变更的前提下修掉绝大多数。改动
8.0.5 → 8.0.16(修 8.x 告警)11.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 audit:34 → 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。NPM_CONFIG_REGISTRY)专属,本项目用 pnpm/Node 不触发;且esbuild 0.27.7是 vite 8 的 peer,强升会破坏 vite 8。验证
pnpm docs:build构建成功pnpm test26/26 通过