Skip to content

Fix NPM vulnerabilites#5459

Merged
andyleejordan merged 1 commit intomainfrom
updates
Apr 8, 2026
Merged

Fix NPM vulnerabilites#5459
andyleejordan merged 1 commit intomainfrom
updates

Conversation

@andyleejordan
Copy link
Copy Markdown
Member

Last round.

Copilot AI review requested due to automatic review settings April 8, 2026 20:15
@andyleejordan andyleejordan requested a review from a team as a code owner April 8, 2026 20:15
Copy link
Copy Markdown

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.

Pull request overview

Mitigates reported NPM transitive vulnerabilities by forcing patched dependency versions via overrides and updating the lockfile accordingly.

Changes:

  • Add overrides in package.json for serialize-javascript and diff.
  • Update package-lock.json to reflect the overridden resolved versions and remove no-longer-needed transitive entries.
  • Document the preferred vulnerability remediation approach (use overrides, avoid npm audit fix --force) in Copilot instructions.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
package.json Adds overrides to pin/raise vulnerable transitive dependencies to patched versions.
package-lock.json Refreshes resolved dependency tree to match the new overrides (notably diff and serialize-javascript).
.github/copilot-instructions.md Updates guidance on handling vulnerabilities via npm audit and overrides.

Comment on lines +97 to +100
"overrides": {
"serialize-javascript": "^7.0.5",
"diff": "^8.0.3"
},
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

The new global overrides force diff to ^8.0.3 and serialize-javascript to ^7.0.5, but mocha@11.7.5 in the lockfile declares dependencies on diff ^7.0.0 and serialize-javascript ^6.0.2 (see package-lock.json:4687-4699). This bypasses upstream semver constraints and risks runtime/test failures if Mocha isn’t compatible with the new major versions. Prefer upgrading the dependency that brings in Mocha (or Mocha itself) to a version that officially depends on these secure versions; if that’s not possible, consider an override strategy that stays within Mocha’s supported major ranges and only bumps to a patched release.

Suggested change
"overrides": {
"serialize-javascript": "^7.0.5",
"diff": "^8.0.3"
},

Copilot uses AI. Check for mistakes.
@andyleejordan andyleejordan merged commit 5f77d8b into main Apr 8, 2026
12 checks passed
@andyleejordan andyleejordan deleted the updates branch April 8, 2026 20:20
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.

2 participants