fix(security): patch critical/high CVEs and migrate pnpm settings#64
Merged
Conversation
### Security - Bump sanitize-html to fix critical XSS CVE - Bump vitest stack to fix critical CVE - Bump @astrojs/react to transitively fix devalue high CVE - Add pnpm overrides: sharp, protobufjs ^7.5.8, @protobufjs/utf8 ^1.1.1 (critical+high CVE chain via @xenova/transformers), rollup ^4.59.0, picomatch ^4.0.4, postcss ^8.5.10, ws ^8.20.1, devalue ^5.8.1 ### Refactoring - Migrate pnpm settings from package.json to pnpm-workspace.yaml (pnpm 10+ ignores the pnpm field in package.json) ### Fixes - Bump base image node:20-slim → node:22-slim in Dockerfile and Dockerfile.local (Astro 6 requires Node ≥22.12; prod Docker was broken) - Copy pnpm-workspace.yaml in both build and runtime stages so overrides apply inside containers
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64 +/- ##
=======================================
Coverage 83.33% 83.33%
=======================================
Files 11 11
Lines 264 264
Branches 68 68
=======================================
Hits 220 220
Misses 26 26
Partials 18 18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
package.jsontopnpm-workspace.yaml(required for pnpm 10+)node:22-slimto satisfy Astro 6's Node ≥22.12 requirementChanges
Security
sanitize-html(xmp XSS, critical) and@vitest/browser(otelCarrier, critical)protobufjs(transitive via@xenova/transformers)rollup,picomatch,postcss,ws,devalue,protobufjs, and@protobufjs/utf8to clear remaining transitive high/moderate vulnerabilitiespnpm Configuration
pnpmsettings field out ofpackage.jsoninto newpnpm-workspace.yaml— pnpm 10+ no longer reads this field frompackage.json; settings were previously silently ignoredDocker
node:20-slimtonode:22-slim— Astro 6 requires Node ≥22.12, so the production Docker build was broken on the old basepnpm-workspace.yamltoCOPYin both the build and runtime stages so pnpm settings are applied during image buildsTest plan
pnpm test— 152/152 passingpnpm exec tsc --noEmit— no type errorspnpm build— production build succeedsdocker build -f Dockerfile.local .— image builds successfully