Skip to content

chore(deps): clear the serialize-javascript and brace-expansion advisories - #22

Merged
robrigo merged 1 commit into
mainfrom
chore/deps-advisories
Aug 19, 2026
Merged

chore(deps): clear the serialize-javascript and brace-expansion advisories#22
robrigo merged 1 commit into
mainfrom
chore/deps-advisories

Conversation

@robrigo

@robrigo robrigo commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Why

serialize-javascript below 7.0.3 reconstructs RegExp flags and Date values so that a serialized payload can execute, and below 7.0.5 a crafted array-like object exhausts CPU. mocha pins the 6.x line, so no lockfile bump reaches the fix and a resolutions entry is the only route across the major. brace-expansion below 1.1.16 expands consecutive empty groups in exponential time; minimatch's own range already admitted the fix, so that one is a plain re-resolution.

Both are development scope. The cross-major pin is the only real risk, and it is not speculative: atomicassets-api already runs the same pin against mocha 11 with a passing suite.

Validation

The suite passes with counts identical to the pre-change run. mocha loads serialize-javascript only in its parallel worker pool, which the default run never touches, so the suite was also run with --parallel to exercise that path; it passes there too. yarn install --frozen-lockfile succeeds, and the lockfile diff is limited to the two packages plus two transitive children that the 6.x line no longer needs.

…ories

serialize-javascript below 7.0.3 rebuilds RegExp flags and Date values in a
way that lets a serialized payload execute, and below 7.0.5 a crafted
array-like object burns CPU. mocha pins the 6.x line, so only a resolutions
entry crosses the major; mocha loads the package solely in its parallel
worker pool, and that path was exercised to prove the pin. brace-expansion
below 1.1.16 expands consecutive empty groups in exponential time, and
minimatch's own range already admitted the fix.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses development-only security advisories by forcing patched dependency versions through Yarn resolution and lockfile re-resolution, ensuring Mocha’s transitive dependency on serialize-javascript no longer stays on the vulnerable 6.x line.

Changes:

  • Re-resolves brace-expansion@^1.1.7 to 1.1.18 (within the existing semver range).
  • Adds a Yarn resolutions override to force serialize-javascript to ^7.0.5 (lockfile resolves to 7.1.0), replacing Mocha’s transitive ^6.0.2.
  • Lockfile cleanup removes now-unneeded transitive packages (randombytes, safe-buffer) that were pulled by serialize-javascript@6.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
yarn.lock Updates resolved versions for brace-expansion and serialize-javascript, and removes obsolete transitive entries after the major bump.
package.json Adds a resolutions entry to force serialize-javascript to a patched 7.x version despite Mocha’s ^6.0.2 dependency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@robrigo
robrigo merged commit 29df854 into main Aug 19, 2026
4 checks passed
@robrigo
robrigo deleted the chore/deps-advisories branch August 19, 2026 02:11
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.

2 participants