[Snyk] Security upgrade bcrypt from 5.1.1 to 6.0.0#174
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-TAR-15127355
There was a problem hiding this comment.
Pull request overview
This PR upgrades the bcrypt package from version 5.1.1 to 6.0.0 to address a directory traversal vulnerability (SNYK-JS-TAR-15127355) in the tar dependency that was part of bcrypt's previous build toolchain. The upgrade eliminates the vulnerable dependency by replacing @mapbox/node-pre-gyp with node-gyp-build.
Changes:
- Upgraded bcrypt from 5.1.1 to 6.0.0 to fix security vulnerability
- Removed @mapbox/node-pre-gyp and its entire dependency tree (including vulnerable tar package)
- Added node-gyp-build as the new build system and upgraded node-addon-api from 5.1.0 to 8.5.0
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Updates bcrypt version to 6.0.0 |
| package-lock.json | Updates bcrypt to 6.0.0, removes @mapbox/node-pre-gyp and transitive dependencies, adds node-gyp-build and upgrades node-addon-api |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "accesscontrol": "2.2.1", | ||
| "apollo-server-express": "3.13.0", | ||
| "bcrypt": "5.1.1", | ||
| "bcrypt": "6.0.0", |
There was a problem hiding this comment.
bcrypt 6.0.0 requires Node.js >= 18, which is a breaking change from the previous version that required >= 10. While your Dockerfile and CI configuration already use compatible Node.js versions (21.2 and 20 respectively), package.json should include an engines field to explicitly document this requirement and prevent users from attempting to run the project on unsupported Node.js versions. Consider adding an engines field specifying the minimum Node.js version required.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #174 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 20 20
Lines 148 148
Branches 21 26 +5
=========================================
Hits 148 148
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.
Snyk changed the following file(s):
package.jsonpackage-lock.jsonVulnerabilities that will be fixed with an upgrade:
SNYK-JS-TAR-15127355
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Directory Traversal