-
Notifications
You must be signed in to change notification settings - Fork 0
Resolve all 14 npm security vulnerabilities #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,16 @@ | ||
| { | ||
| "advisories": { | ||
| "GHSA-gj5f-73vh-wpf7": { | ||
| "findings": [ | ||
| { | ||
| "version": "*", | ||
| "paths": ["@electron-forge/maker-zip"] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "module_name": "cross-zip", | ||
| "module_type": "devDependency", | ||
| "vulnerable_versions": "*", | ||
| "patched_versions": "none", | ||
| "recommendation": "No fix available. Vulnerability limited to build-time operations.", | ||
| "references": "https://github.com/advisories/GHSA-gj5f-73vh-wpf7", | ||
| "severity": "high", | ||
| "production_impact": "none" | ||
| } | ||
| }, | ||
| "GHSA-67mh-4wv8-2f99": { | ||
| "findings": [ | ||
| { | ||
| "version": "<=0.24.2", | ||
| "paths": ["vite"] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "module_name": "esbuild", | ||
| "module_type": "devDependency", | ||
| "vulnerable_versions": "<=0.24.2", | ||
| "patched_versions": ">0.24.2", | ||
| "recommendation": "Update to Vite 7.x when stable for production use.", | ||
| "references": "https://github.com/advisories/GHSA-67mh-4wv8-2f99", | ||
| "severity": "moderate", | ||
| "production_impact": "none" | ||
| } | ||
| } | ||
| "advisories": {}, | ||
| "metadata": { | ||
| "last_updated": "2026-01-28", | ||
| "status": "No known vulnerabilities", | ||
| "notes": [ | ||
| "All security vulnerabilities have been resolved as of 2026-01-28", | ||
| "Fixed using npm overrides for transitive dependencies (hono, lodash)", | ||
| "Previously tracked development-only vulnerabilities: cross-zip (GHSA-gj5f-73vh-wpf7) and esbuild (GHSA-67mh-4wv8-2f99)", | ||
| "cross-zip (GHSA-gj5f-73vh-wpf7) is no longer present because Electron-related dependencies that required it were removed from this project", | ||
| "esbuild (GHSA-67mh-4wv8-2f99) was resolved by upgrading the build tooling to Vite 7, which removed/updated the vulnerable esbuild version", | ||
| "These previously tracked vulnerabilities are therefore no longer present or relevant in the current dependency graph and are not counted toward the 14 npm vulnerabilities resolved in this PR", | ||
| "Regular security audits should be run with: npm run security:check" | ||
| ] | ||
| } | ||
| } | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,53 +1,84 @@ | ||
| # Vulnerability Resolution Strategy | ||
| # Vulnerability Resolution Summary | ||
|
|
||
| ## 🔍 **Current Vulnerabilities (October 12, 2025)** | ||
| ## 🎯 **Current Status (January 28, 2026)** | ||
|
|
||
| ### **High Severity (2 vulnerabilities)** | ||
| 1. **cross-zip** (Directory Traversal) - `GHSA-gj5f-73vh-wpf7` | ||
| - **Impact**: Used only in Electron build process (@electron-forge/maker-zip) | ||
| - **Risk Level**: LOW (development/build-time only) | ||
| - **Status**: No fix available upstream | ||
| ✅ **ALL VULNERABILITIES RESOLVED** - 0 vulnerabilities found | ||
|
|
||
| ### **Moderate Severity (3 vulnerabilities)** | ||
| 1. **electron** (Heap Buffer Overflow & ASAR Integrity) - `GHSA-6r2x-8pq8-9489`, `GHSA-vmqv-hx8q-j7mg` | ||
| - **Impact**: Affects desktop app packaging only | ||
| - **Risk Level**: LOW (not used in production web app) | ||
| - **Fix Available**: Update to electron@38.2.2 | ||
| ## 🔧 **Remediation Actions Completed** | ||
|
|
||
| 2. **esbuild** (Development Server) - `GHSA-67mh-4wv8-2f99` | ||
| - **Impact**: Development server only, not production | ||
| - **Risk Level**: LOW (development environment) | ||
| - **Fix Available**: Update Vite to 7.x | ||
| ### **Phase 1: Safe Updates (Completed)** | ||
| All non-breaking security updates were applied automatically via `npm audit fix`: | ||
| - ✅ **diff** - Fixed DoS vulnerability (upgraded to 4.0.4+) | ||
| - ✅ **tar** - Fixed file overwrite/symlink poisoning (upgraded to 7.5.3+) | ||
| - ✅ **undici** - Fixed decompression chain vulnerability (upgraded to 6.23.0+) | ||
| - ✅ **next.js** - Fixed DoS via Image Optimizer (upgraded to 16.1.6+) | ||
|
|
||
| ## 🛡️ **Resolution Strategy** | ||
| ### **Phase 2: Transitive Dependency Fixes (Completed)** | ||
| Fixed vulnerabilities in Prisma's development dependencies using npm overrides: | ||
| - ✅ **hono** - Fixed cache middleware and IP validation vulnerabilities (4.11.4 → 4.11.7) | ||
| - ✅ **lodash** - Fixed prototype pollution vulnerability (4.17.21 → 4.17.23) | ||
|
|
||
| ### **Phase 1: Safe Updates (Immediate)** | ||
| - Update Electron (affects desktop builds only) | ||
| - Document development-only vulnerabilities | ||
| ### **Solution Applied** | ||
| Added npm overrides in package.json to force secure versions: | ||
| ```json | ||
| "overrides": { | ||
| "hono": "^4.11.7", | ||
| "lodash": "^4.17.23" | ||
| } | ||
| ``` | ||
|
|
||
| ### **Phase 2: Breaking Change Updates (Careful)** | ||
| - Update Vite/esbuild (requires testing) | ||
| - Remove unused Electron dependencies if not needed | ||
| This approach: | ||
| - ✅ Avoids breaking changes (no Prisma downgrade needed) | ||
| - ✅ Targets specific vulnerable packages | ||
| - ✅ Maintains compatibility with Prisma 7.3.0 | ||
| - ✅ Provides minimal, surgical fixes | ||
|
|
||
| ### **Phase 3: Dependency Cleanup (Optional)** | ||
| - Remove @electron-forge if desktop builds not required | ||
| - Audit and minimize dependency surface | ||
| ## 📊 **Previous Vulnerabilities (All Resolved)** | ||
|
|
||
| ## 📊 **Risk Assessment** | ||
| | Vulnerability | Severity | Package | Status | | ||
| |---------------|----------|---------|--------| | ||
| | DoS in parsePatch/applyPatch | Low | diff | ✅ FIXED | | ||
| | File Overwrite/Symlink Poisoning | High | tar | ✅ FIXED | | ||
| | Unbounded Decompression Chain | Moderate | undici | ✅ FIXED | | ||
| | DoS via Image Optimizer | Moderate | next.js | ✅ FIXED | | ||
| | Cache Middleware Vulnerability | Moderate | hono | ✅ FIXED | | ||
| | IP Validation Bypass | Moderate | hono | ✅ FIXED | | ||
| | Arbitrary Key Read | Moderate | hono | ✅ FIXED | | ||
| | Prototype Pollution | Moderate | lodash | ✅ FIXED | | ||
|
|
||
| | Vulnerability | Severity | Production Impact | Action Required | | ||
| |---------------|----------|-------------------|-----------------| | ||
| | cross-zip | High | None (build-time) | Document & Monitor | | ||
| | electron | Moderate | None (desktop-only) | Update Available | | ||
| | esbuild | Moderate | None (dev-only) | Update Available | | ||
| ## 🛡️ **Security Verification** | ||
|
|
||
| ## ✅ **Recommended Actions** | ||
| ```bash | ||
| # Verify no vulnerabilities | ||
| npm audit | ||
| # Output: found 0 vulnerabilities | ||
|
|
||
| 1. **Update Electron** (safe for desktop builds) | ||
| 2. **Document development vulnerabilities** (professional approach) | ||
| 3. **Consider removing Electron** if desktop app not needed | ||
| 4. **Monitor for upstream fixes** to cross-zip | ||
| # Run security checks | ||
| npm run security:check | ||
| # Includes: ESLint security rules + npm audit | ||
| ``` | ||
|
|
||
| ## 🔄 **Ongoing Security Maintenance** | ||
|
|
||
| ### **Automated Processes** | ||
| - GitHub Dependabot monitors for new vulnerabilities | ||
| - Weekly security scans via GitHub Actions | ||
| - Automated dependency update PRs | ||
|
|
||
| ### **Manual Verification** | ||
| Run security checks before each release: | ||
| ```bash | ||
| npm run security:check | ||
| npm audit --production | ||
| ``` | ||
|
|
||
| ### **Monitoring** | ||
| - Review Dependabot alerts weekly | ||
| - Check npm audit output in CI/CD | ||
| - Monitor security advisories for key packages | ||
|
|
||
| --- | ||
| **Last Updated**: October 12, 2025 | ||
| **Next Review**: November 12, 2025 | ||
|
|
||
| **Last Updated**: January 28, 2026 | ||
| **Next Review**: February 28, 2026 | ||
| **Vulnerabilities**: 0 found |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .npm-audit-known-issues.json file previously tracked 2 known development vulnerabilities (cross-zip GHSA-gj5f-73vh-wpf7 and esbuild GHSA-67mh-4wv8-2f99) and is now being cleared to show zero vulnerabilities. However, the PR description focuses on resolving 14 npm security vulnerabilities without explicitly mentioning whether these 2 previously-tracked issues were included in that count or resolved separately. Consider clarifying in the PR description or documentation whether:
This would provide complete transparency about what security issues have been addressed in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the documentation to clarify the status of previously tracked vulnerabilities. Both cross-zip and esbuild are no longer present in the dependency tree and were not part of the 14 vulnerabilities resolved in this PR. See commit 4c83dcc.