Resolve tmp security vulnerability#18
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses a critical security vulnerability in the tmp package (CVE relating to arbitrary file/directory write via symbolic link manipulation) by using npm's overrides feature to force all transitive dependencies to use tmp@^0.2.3 or higher. The change primarily affects the dependency chain through eslint → inquirer → external-editor → tmp, upgrading tmp from version 0.0.33 to 0.2.5. Additionally, the PR includes other non-breaking security patches via npm audit fix for packages like brace-expansion, cross-spawn, js-yaml, micromatch, path-to-regexp, semver, and word-wrap.
Key changes:
- Added npm
overridesconfiguration to forcetmp@^0.2.3across all dependencies - Updated tmp from 0.0.33 to 0.2.5 and removed the obsolete
os-tmpdirdependency - Applied security patches to 7 additional packages via
npm audit fix
Reviewed Changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Added overrides section to force tmp@^0.2.3 for all transitive dependencies |
| package-lock.json | Updated tmp from 0.0.33 to 0.2.5, removed os-tmpdir dependency, and applied security patches to brace-expansion, cross-spawn, js-yaml, micromatch, path-to-regexp, semver, and word-wrap across both node_modules and legacy sections |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
This PR resolves a security vulnerability in the `tmp` package by using npm overrides to force a patched version
https://github.com/github/Pac-tocat/security/dependabot/26
Additional Security Fixes
Also resolved other non-breaking vulnerabilities via `npm audit fix`:
Future Considerations
A proper ESLint upgrade can be planned separately as a future enhancement if needed