Skip to content

Pin the patched brace-expansion and uuid in the docs site - #1444

Merged
andredlng merged 1 commit into
mainfrom
docs-npm-audit
Jul 28, 2026
Merged

Pin the patched brace-expansion and uuid in the docs site#1444
andredlng merged 1 commit into
mainfrom
docs-npm-audit

Conversation

@andredlng

Copy link
Copy Markdown
Collaborator

Summary

The docs site had 8 open Dependabot alerts and npm audit reported 23 vulnerabilities. It now reports 0.

Two overrides entries, alongside the serialize-javascript one already there:

"overrides": {
  "serialize-javascript": "^7.0.3",
  "brace-expansion": "5.0.8",
  "uuid": "11.1.1"
}

Why npm audit fix was no help

It changed nothing at all — no lockfile edit, no diff. Its proposed fix for the high-severity brace-expansion advisory was @easyops-cn/docusaurus-search-local@0.26.1, while package.json pins ^0.55.2: a downgrade across majors of the search plugin, which is worse than the issue it addresses. That is why it was marked breaking and skipped.

The advisory itself is unusually broad — it flags <= 5.0.7, so every 1.x and 2.x release qualifies, and the only patched release is 5.0.8. Overriding the transitive dependency keeps the plugin at 0.55 and resolves it.

Half the alerts were already stale

Dependabot listed js-yaml and http-proxy-middleware, but the lockfile already carried exactly the patched versions:

package installed advisory wants
js-yaml 3.15.0, 4.3.0 3.15.0, 4.3.0
http-proxy-middleware 2.0.10 2.0.10
brace-expansion 1.1.16, 2.1.3 5.0.8
uuid 8.3.2 11.1.1

Only the last two needed anything.

Verified

  • npm auditfound 0 vulnerabilities
  • npm run build succeeds; index, imports and reference pages all generated
  • the search plugin still emits build/search-index.json, which is the thing npm's suggested downgrade would have put at risk

Scope

Docs site only. None of these packages ship with the Python CLI — they are build-time dependencies of the Docusaurus site, and all four advisories are DoS-class.

npm audit fix could not help: it proposed downgrading
@easyops-cn/docusaurus-search-local from 0.55 to 0.26 to satisfy the
brace-expansion advisory, which flags every 1.x and 2.x release and is fixed
only in 5.0.8. Overriding the transitive dependency keeps the plugin and
resolves it.

js-yaml and http-proxy-middleware were already at their patched versions, so
those alerts were stale.

The docs site now audits clean.
@andredlng andredlng self-assigned this Jul 28, 2026
@github-actions

Copy link
Copy Markdown

📖 Docs preview

Preview site: https://brave-water-0cee36e03-1444.westeurope.7.azurestaticapps.net

No rendered doc pages changed.

@andredlng
andredlng merged commit 1a8ab3e into main Jul 28, 2026
7 checks passed
@andredlng
andredlng deleted the docs-npm-audit branch July 28, 2026 13:42
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