FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix NPM vulnerabilites by andyleejordan · Pull Request #5459 · PowerShell/vscode-powershell · GitHub

Fix NPM vulnerabilites - #5459

Merged
Andy Jordan (andyleejordan) merged 1 commit into
mainfrom
updates
Apr 8, 2026
Merged

Andy Jordan (andyleejordan) merged 1 commit into
mainfrom
updates

Conversation

Copy link
Copy Markdown
Member

Last round.

Copilot AI review requested due to automatic review settings April 8, 2026 20:15
Andy Jordan (andyleejordan) requested a review from a team as a code owner April 8, 2026 20:15

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 thread package.json
Comment on lines +97 to +100
"overrides": {
"serialize-javascript": "^7.0.5",
"diff": "^8.0.3"
},

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.
Andy Jordan (andyleejordan) merged commit 5f77d8b into main Apr 8, 2026
12 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL