fix: security audit — upgrade vulnerable deps and harden API/headers#4
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
fix: security audit — upgrade vulnerable deps and harden API/headers#4devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
- Upgrade next 12.0.9 -> 16.2.9 (fixes 13+ CVEs including critical auth bypass, SSRF, DoS) - Upgrade react/react-dom 17.0.2 -> 19.2.7 - Upgrade eslint, typescript, @types/node, @types/react to latest - Add HTTP method validation to /api/hello (reject non-GET with 405) - Add security headers: X-Content-Type-Options, X-Frame-Options, Referrer-Policy - Disable X-Powered-By header - Fix handlers/upgrade.go missing package declaration and import - Harden .gitignore to cover root .env file Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
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.
Summary
Addresses 18 known vulnerabilities (2 critical, 7 high, 9 moderate) found via
npm audit, plus several hardening improvements.Critical fixes
Dependency upgrades —
next12.0.9 → 16.2.9 eliminates 13+ CVEs:react/react-dom17 → 19,typescript4.5 → 5.8,eslint8 → 10, all@types/*to latest. Resolvesminimistcritical prototype pollution and 5 high-severity transitive dep vulns.Residual: 2 moderate
postcssissues — transitive dep ofnext, unfixable without downgrading.Hardening
pages/api/hello.tsnow rejects non-GET requests with405 Method Not Allowed+Allowheadernext.config.js:X-Content-Type-Options: nosniff,X-Frame-Options: DENY,Referrer-Policy: strict-origin-when-cross-originpoweredByHeader: false— suppressesX-Powered-By: Next.jsto reduce fingerprinting surface.gitignore: added root.envand.env*.localcatch-all to prevent accidental secret commitshandlers/upgrade.go: added missingpackagedeclaration andimportso the file compilesLink to Devin session: https://app.devin.ai/sessions/2c5f8758d14541c784bcae3f71c5a5d9
Requested by: @Bautisa46