Conversation
…nused axios, add overrides for minimatch and brace-expansion Co-authored-by: sfosss <147890625+sfosss@users.noreply.github.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates npm dependencies to remediate ReDoS/DoS vulnerabilities by bumping @modelcontextprotocol/sdk, removing an unused axios dependency, and pinning vulnerable transitive modules minimatch and brace-expansion via package.json overrides, with corresponding lockfile updates. Flow diagram for npm install behavior with overrides and security fixesgraph TD
A["Developer runs npm install"] --> B["npm reads package.json dependencies"]
B --> C["Resolve @modelcontextprotocol/sdk ^1.25.2"]
B --> D["No axios dependency (removed)"]
C --> E["Resolve transitive minimatch and brace-expansion"]
E --> F["Apply overrides: minimatch ^3.1.5"]
E --> G["Apply overrides: brace-expansion ^1.1.12"]
F --> H["Install patched minimatch"]
G --> I["Install patched brace-expansion"]
H --> J["Generate updated package-lock.json"]
I --> J
J --> K["Run npm audit"]
K --> L["0 vulnerabilities reported"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="package.json" line_range="42-45" />
<code_context>
+ "@modelcontextprotocol/sdk": "^1.25.2",
"dotenv": "^16.3.1"
},
+ "overrides": {
+ "minimatch": "^3.1.5",
+ "brace-expansion": "^1.1.12"
+ },
"devDependencies": {
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Use exact versions in `overrides` instead of caret ranges for deterministic behavior.
Using caret ranges here means future `3.x`/`1.x` releases could be pulled in and reintroduce bugs or security issues you’re trying to avoid. Pin these to exact versions (e.g. `"3.1.5"` and `"1.1.12"`) so installs remain stable and reproducible.
```suggestion
"overrides": {
"minimatch": "3.1.5",
"brace-expansion": "1.1.12"
},
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| "overrides": { | ||
| "minimatch": "^3.1.5", | ||
| "brace-expansion": "^1.1.12" | ||
| }, |
There was a problem hiding this comment.
suggestion (bug_risk): Use exact versions in overrides instead of caret ranges for deterministic behavior.
Using caret ranges here means future 3.x/1.x releases could be pulled in and reintroduce bugs or security issues you’re trying to avoid. Pin these to exact versions (e.g. "3.1.5" and "1.1.12") so installs remain stable and reproducible.
| "overrides": { | |
| "minimatch": "^3.1.5", | |
| "brace-expansion": "^1.1.12" | |
| }, | |
| "overrides": { | |
| "minimatch": "3.1.5", | |
| "brace-expansion": "1.1.12" | |
| }, |
There was a problem hiding this comment.
Pull request overview
Updates the project’s npm dependency tree to remediate multiple ReDoS/DoS vulnerabilities (and remove an unused vulnerable dependency), resulting in a clean npm audit.
Changes:
- Bump
@modelcontextprotocol/sdkto a patched^1.25.2range (lock resolves to1.27.1). - Remove unused
axiosdependency and regenerate the lockfile. - Add npm
overridesto force patchedminimatchandbrace-expansionversions.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Upgrades @modelcontextprotocol/sdk, removes axios, and adds overrides for minimatch/brace-expansion. |
| package-lock.json | Regenerates dependency tree for the new SDK version and override resolutions; also updates root metadata entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "minimatch": "^3.1.5", | ||
| "brace-expansion": "^1.1.12" |
There was a problem hiding this comment.
The overrides entries use semver ranges (^3.1.5, ^1.1.12). Since the PR description says these are meant to pin vulnerable transitive dependencies, consider using exact versions here so that regenerating the lockfile can’t silently move to a different (unreviewed) version.
| "minimatch": "^3.1.5", | |
| "brace-expansion": "^1.1.12" | |
| "minimatch": "3.1.5", | |
| "brace-expansion": "1.1.12" |
Multiple ReDoS (and one DoS) vulnerabilities present in the dependency tree via
@modelcontextprotocol/sdk,minimatch,brace-expansion, and an unusedaxiosdependency.Changes
@modelcontextprotocol/sdk: Bumped^1.0.1→^1.25.2to fix ReDoS (GHSA-8r9q-7v3j-jr4g; affected< 1.25.2)axios: Removed — never imported in code, carried DoS vulnerability (GHSA-43fc-jf86-j433; affected1.0.0–1.13.4)minimatch/brace-expansion: Addedoverridesto pin transitive deps to patched versions (^3.1.5/^1.1.12) resolving three ReDoS CVEs in theminimatch3.x chain and GHSA-v6h2-p8h4-qcjw inbrace-expansionnpm auditreports 0 vulnerabilities after these changes.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Summary by Sourcery
Update npm dependencies to address ReDoS and DoS vulnerabilities and ensure a clean security audit.
Bug Fixes:
Build: