Skip to content

fix(deps): drop unused protobufjs-cli from client/web - #44

Merged
tiennm99 merged 1 commit into
mainfrom
fix/drop-unused-protobufjs-cli-260725
Jul 25, 2026
Merged

tiennm99 merged 1 commit into
mainfrom
fix/drop-unused-protobufjs-cli-260725

Conversation

@tiennm99

Copy link
Copy Markdown
Member

Finishes closing Dependabot alert #73 (GHSA-mh99-v99m-4gvg, high). PR #43 bumped the 5.x instance to 5.0.8, but the alert stayed open — the advisory's range is <= 5.0.7, which matches brace-expansion@2.1.2 too. Dependabot's original conflict error was right that both trees had to move.

Why removal instead of an override

client/web/src/net/proto.ts parses the schema with the protobufjs runtime precisely to avoid codegen (see its header comment: "keeps the build chain free of a separate pbjs codegen step"). Nothing in the repo, npm scripts, or CI invokes pbjs/pbts — the only references to protobufjs-cli were its own package.json entry and that comment. It existed solely to carry glob@8 -> minimatch@5 -> brace-expansion@2.1.2. Note protobufjs-cli@2.6.1 (latest) still depends on glob@^8, so upgrading would not have helped.

The alternative was overrides: { "brace-expansion": "^5.0.8" }, which works (v5's CJS export is still a bare function, so minimatch@5 would not break) but keeps an unused toolchain plus jsdoc/espree/escodegen/tmp in the tree.

Result

  • Only brace-expansion@5.0.8 resolves; no minimatch@5 / glob@8 left
  • npm audit: 4 high -> 0 vulnerabilities
  • 591 lockfile lines removed

Verification

  • npm ci clean
  • npm test 14/14 passed
  • npm run build-nolog succeeded

If you do use pbjs manually outside the repo, say so and I'll switch to the override approach instead.

src/net/proto.ts parses the .proto schema with the protobufjs runtime
specifically to avoid a pbjs codegen step, and nothing in the repo, npm
scripts, or CI invokes pbjs/pbts. The dependency only carried a vulnerable
subtree: glob@8 -> minimatch@5 -> brace-expansion@2.1.2, which GHSA-mh99-v99m-4gvg
flags via its <= 5.0.7 range.

Removing it leaves brace-expansion@5.0.8 as the only resolution and takes
npm audit from 4 high findings to 0.
@tiennm99
tiennm99 merged commit 22bd33b into main Jul 25, 2026
2 checks passed
@tiennm99
tiennm99 deleted the fix/drop-unused-protobufjs-cli-260725 branch July 25, 2026 14:06
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