docs: pin patched versions of the documentation site's vulnerable build dependencies - #900
Merged
Merged
Conversation
Dependabot flagged 25 advisories in docs-website, all of them in the build toolchain of the documentation site. An overrides block resolves the ones which have a fix, which brings it down to 18 - all remaining ones are the cascade of a single advisory pair without a fixed release. * serialize-javascript: copy-webpack-plugin and css-minimizer-webpack-plugin pin ^6.0.0, which is affected by GHSA-5c6j-r48x-rmvq (RCE) and GHSA-qj8w-gfj5-8c6v (CPU exhaustion). Forced to ^7.1.0. * uuid: sockjs pins ^8.3.2, affected by GHSA-w5hq-g745-h8pq. Forced to ^11.1.1. Only v3/v5/v6 with a buf argument are affected and sockjs calls v4, so this one was not exploitable here either way. Not fixable: image-size, used by @docusaurus/mdx-loader, is affected by GHSA-w3rx-r6r6-pgpr and GHSA-5p2g-fcmc-qvqq in every published version. Both are a denial of service through a crafted ICNS, JXL or HEIF file, evaluated at build time over the images committed here. Verified with a clean production build and by starting the dev server, since the uuid override lands in the hot reload path. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LidmXPYjGN64P1RgCiY7Ri
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.
Resolves the fixable Dependabot alerts which appeared with the documentation site in #894.
All of them sit in the build toolchain of
docs-website. Nothing here is shipped: the published site is static HTML, and the server is not affected. The alert count looks large because three root advisories cascade up through every Docusaurus package.What changed
An
overridesblock indocs-website/package.jsonforces two transitive dependencies to a patched version. That takes the audit from 25 findings (6 moderate, 19 high) to 18, all of which are the cascade of a single advisory pair which has no fix.serialize-javascript6.0.2copy-webpack-pluginandcss-minimizer-webpack-pluginpin^6.0.0^7.1.0uuid8.3.2sockjs, viawebpack-dev-server, pins^8.3.2^11.1.1npm auditreportsserialize-javascriptas "No fix available", which is misleading: 7.1.0 exists and is outside the vulnerable range, npm just cannot reach it through the parents' pins. An override can.For
uuid, onlyv3/v5/v6with abufargument are affected andsockjscallsv4, so it was not exploitable here either way — the override is there to clear the alert.What is not fixed
image-size, used by@docusaurus/mdx-loaderto measure the images of a page, is affected by GHSA-w3rx-r6r6-pgpr and GHSA-5p2g-fcmc-qvqq in every published version — the advisory range is*and the installed 2.0.2 is already the latest. There is no version to move to.Both are a denial of service through a crafted ICNS, JXL or HEIF file, evaluated at build time over the images committed to this repository. Triggering it means committing a malicious image, and the damage is a hanging build; no published page and no game server is exposed. These 18 findings are reasonable candidates to dismiss as "risk is tolerable" if the open alerts are noisy.
Notes
The reasoning, and the condition for removing each override again (
npm ls <package>no longer printing "overridden"), is documented indocs-website/README.md, so the pins don't turn into cargo cult.Testing
Verified with a clean install from the lockfile, the way CI does it:
The dev server (
npm start) was started as well, since theuuidoverride lands insockjs, which is the hot reload path — a build-only check would not have caught a break there. It compiles and serves pages.🤖 Generated with Claude Code
https://claude.ai/code/session_01LidmXPYjGN64P1RgCiY7Ri
Generated by Claude Code