Skip to content

fix(security): patch critical/high CVEs and migrate pnpm settings#64

Merged
llbbl merged 1 commit into
mainfrom
chore/maintenance-2026-06
Jun 3, 2026
Merged

fix(security): patch critical/high CVEs and migrate pnpm settings#64
llbbl merged 1 commit into
mainfrom
chore/maintenance-2026-06

Conversation

@llbbl

@llbbl llbbl commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Patched critical/high CVEs via direct upgrades and pnpm overrides
  • Migrated pnpm configuration from package.json to pnpm-workspace.yaml (required for pnpm 10+)
  • Bumped Docker base image to node:22-slim to satisfy Astro 6's Node ≥22.12 requirement

Changes

Security

  • CVE patches: Upgraded sanitize-html (xmp XSS, critical) and @vitest/browser (otelCarrier, critical)
  • protobufjs chain: Addressed critical+high chain in protobufjs (transitive via @xenova/transformers)
  • pnpm overrides: Added overrides for rollup, picomatch, postcss, ws, devalue, protobufjs, and @protobufjs/utf8 to clear remaining transitive high/moderate vulnerabilities

pnpm Configuration

  • pnpm-workspace.yaml: Migrated pnpm settings field out of package.json into new pnpm-workspace.yaml — pnpm 10+ no longer reads this field from package.json; settings were previously silently ignored

Docker

  • Dockerfile: Bumped base image from node:20-slim to node:22-slim — Astro 6 requires Node ≥22.12, so the production Docker build was broken on the old base
  • Dockerfile: Added pnpm-workspace.yaml to COPY in both the build and runtime stages so pnpm settings are applied during image builds

Test plan

  • pnpm test — 152/152 passing
  • pnpm exec tsc --noEmit — no type errors
  • pnpm build — production build succeeds
  • docker build -f Dockerfile.local . — image builds successfully
  • Indexer runtime — content indexing works end-to-end

### 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
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​vitest/​ui@​4.1.8991007599100
Added@​vitest/​browser@​4.1.81001007998100
Addedvitest@​4.1.8981007999100
Added@​vitest/​coverage-v8@​4.1.8991007998100
Added@​astrojs/​react@​5.0.7991008296100
Addedsanitize-html@​2.17.410010010091100

View full report

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.33%. Comparing base (478259f) to head (a065568).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@llbbl llbbl merged commit 2502f90 into main Jun 3, 2026
6 checks passed
@llbbl llbbl deleted the chore/maintenance-2026-06 branch June 3, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant