Skip to content

chore(deps): force mocha to use serialize-javascript@7.0.5 from override#2422

Merged
jpgough-ms merged 1 commit intofinos:mainfrom
rocketstack-matt:fix/dependabot-174-mocha-serialize-javascript
May 6, 2026
Merged

chore(deps): force mocha to use serialize-javascript@7.0.5 from override#2422
jpgough-ms merged 1 commit intofinos:mainfrom
rocketstack-matt:fix/dependabot-174-mocha-serialize-javascript

Conversation

@rocketstack-matt
Copy link
Copy Markdown
Member

Description

Resolves Dependabot alert #174 (GHSA-5c6j-r48x-rmvq — RCE in serialize-javascript via RegExp.flags / Date.prototype.toISOString).

The existing serialize-javascript: "^7.0.5" override in package.json was already in place, but package-lock.json retained a stale node_modules/mocha/node_modules/serialize-javascript@6.0.2 entry from before the override was added. npm install preserves nested entries even after an override is added, so the vulnerable copy persisted on every install.

This PR removes the stale lockfile entry so npm re-resolves mocha's serialize-javascript under the override. After install, mocha now uses the hoisted top-level serialize-javascript@7.0.5, and there is no longer a vulnerable copy on disk.

Verified locally:

  • npm ls serialize-javascript no longer shows any 6.x entries (the only remaining 6.x ranges are warnings from npm because consumers' declared range is ^6.x, but the actual installed version is 7.0.5)
  • node -e "require('serialize-javascript')" and require('mocha') both load successfully

Two unrelated metadata flips (dev:true,peer:true removed from axios@1.16.0 and proxy-from-env@2.1.0) appear in the diff — these are npm's resolver tidying on re-resolve, not behavioural changes.

Type of Change

  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • Dependencies

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

The serialize-javascript ^7.0.5 override in package.json wasn't being
applied to mocha's nested copy because the lockfile retained a stale
node_modules/mocha/node_modules/serialize-javascript@6.0.2 entry from
before the override was added. npm install preserves existing nested
entries even when an override is added afterwards.

Removing the stale lockfile entry lets npm re-resolve mocha's
serialize-javascript dependency under the override; it now points at
the hoisted top-level serialize-javascript@7.0.5.

Resolves Dependabot alert finos#174 (GHSA-5c6j-r48x-rmvq, RCE in
serialize-javascript via RegExp.flags / Date.prototype.toISOString).
Copilot AI review requested due to automatic review settings May 6, 2026 12:20
@rocketstack-matt rocketstack-matt requested a review from a team as a code owner May 6, 2026 12:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions Bot added the config label May 6, 2026
@jpgough-ms jpgough-ms merged commit 28374cd into finos:main May 6, 2026
21 checks passed
@rocketstack-matt rocketstack-matt deleted the fix/dependabot-174-mocha-serialize-javascript branch May 6, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants