fix: upgrade js-yaml to 3.15.0, 4.3.0 (CVE-2026-59869) - #1002
Conversation
Automated dependency upgrade by OrbisAI Security
📝 WalkthroughWalkthroughpackage.json 新增 pnpm 配置,并通过 Changes依赖版本配置
Estimated code review effort: 1 (简单) | ~5 分钟 Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Around line 65-70: Regenerate pnpm-lock.yaml using pnpm install
--lockfile-only after the package.json override for js-yaml, then verify every
relevant js-yaml resolution, including gray-matter’s dependency, is pinned to
3.15.0 rather than 3.14.2.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| "packageManager": "pnpm@11.18.0", | ||
| "pnpm": { | ||
| "overrides": { | ||
| "js-yaml": "3.15.0" | ||
| } | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
同步更新 pnpm-lock.yaml。
package.json 将 js-yaml 覆盖为 3.15.0,但 pnpm-lock.yaml 仍解析 js-yaml@3.14.2,且 gray-matter 仍引用 3.14.2。这会导致冻结安装失败,或使非冻结安装依赖未提交的本地重新解析。当前提交无法可靠保证 CVE-2026-59869 的修复版本。
请使用 pnpm install --lockfile-only 重新生成锁文件,并确认所有相关解析结果均为 3.15.0。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` around lines 65 - 70, Regenerate pnpm-lock.yaml using pnpm
install --lockfile-only after the package.json override for js-yaml, then verify
every relevant js-yaml resolution, including gray-matter’s dependency, is pinned
to 3.15.0 rather than 3.14.2.
Summary
Upgrade js-yaml from 3.14.2 to 3.15.0, 4.3.0 to fix CVE-2026-59869.
Vulnerability
CVE-2026-59869pnpm-lock.yamlDescription: js-yaml: js-yaml: Denial of Service via crafted YAML documents
Evidence
Scanner confirmation: trivy rule
CVE-2026-59869flagged this pattern.Production code: This file is in the production codebase, not test-only code.
Changes
package.jsonpnpm-lock.yamlBehavior Preservation
The change is scoped to 2 files on the vulnerable path, and the project builds successfully with this change applied.
Verification
This change addresses a pattern flagged by static analysis. The code path handles user-influenced input and the fix reduces the attack surface against both manual and automated exploitation.
Automated security fix by OrbisAI Security
Summary by CodeRabbit