Repository navigation
chore(deps): override argparse 1 in docs to drop vulnerable sprintf-js - #14
Merged
Merged
Conversation
docusaurus-plugin-llms pins gray-matter 4.0.3, which pulls js-yaml 3 -> argparse 1 -> sprintf-js 1.0.3 (GHSA-hp3w-g68c-fv3c, no patched release). js-yaml 3 only requires argparse from its CLI (bin/js-yaml.js), never from the library gray-matter loads, so overriding argparse@^1 to ^2 dedupes onto the argparse 2.0.1 already in the tree and removes sprintf-js entirely. npm audit: 33 -> 29 advisories. The remaining 29 all trace to braces <=3.0.3 (GHSA-vfj7-8cjw-p6xm), which also has no patched release and sits under micromatch, chokidar and fast-glob throughout Docusaurus.
There was a problem hiding this comment.
🟢 Approval recommended
The targeted docs-only override and lockfile changes are consistent, with no blocking issues identified.
0 open findings
What changed in this PR
Removes the vulnerable sprintf-js dependency from the documentation toolchain without changing library code.
Changes:
- Overrides
argparse@^1with^2.0.1. - Removes obsolete
argparseandsprintf-jslockfile entries.
| File | Description |
|---|---|
| docs/package.json | Adds the targeted argparse override. |
| docs/package-lock.json | Removes dependencies eliminated by the override. |
Files not reviewed (1)
- docs/package-lock.json: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
Resolves the open sprintf-js Dependabot alert (#43, GHSA-hp3w-g68c-fv3c, moderate) in
docs/. Upstream has no patched release, so the fix is to drop the package entirely.docusaurus-plugin-llms→gray-matter@4.0.3(pinned) →js-yaml@3→argparse@1→sprintf-js@1.0.3.argparseonly from its CLI (bin/js-yaml.js). The library that gray-matter loads never touches it.argparse@^1→^2.0.1dedupes onto theargparse@2.0.1already in the tree (via js-yaml 4), and sprintf-js drops out.npm auditindocs/goes from 33 advisories (29 high, 4 moderate) to 29 high.What's left: braces (alert #42, high)
All 29 remaining advisories trace to
braces <=3.0.3(GHSA-vfj7-8cjw-p6xm). There is no patched release, and even the latest Docusaurus 4 canary is affected throughmicromatch,chokidarandfast-glob, so no override can fix it. It is a stack-exhaustion DoS triggered by deeply nested brace patterns. The docs toolchain only expands glob patterns we write ourselves, and none of it ships in the static site.Testing
npm ci && npm run buildat the root, thennpm ci && npm run buildindocs/(the CI docs job): succeeds.docusaurus-plugin-llmsprocessed all 11 documents through gray-matter.npm ls argparse sprintf-js --all: onlyargparse@2.0.1, no sprintf-js.npm run format:checkandnpm run lintpass.No changelog entry: nothing under
src/changed.