Skip to content

fix(deps): upgrade to astro 6 to patch security vulnerabilities - #415

Merged
appleboy merged 2 commits into
masterfrom
fix/astro-6-security-upgrade
Jun 23, 2026
Merged

appleboy merged 2 commits into
masterfrom
fix/astro-6-security-upgrade

Conversation

@appleboy

Copy link
Copy Markdown
Member

Summary

Fixes all 9 Trivy-reported vulnerabilities (4 HIGH, 5 MEDIUM) in package-lock.json. The Astro CVEs are only patched in Astro 6.x, which required a coordinated major upgrade of the toolchain.

Dependency changes

Package Before After CVEs fixed
astro ^5.18.1 ^6.4.8 CVE-2026-50146, 54299, 41067, 54298
@astrojs/starlight ^0.32.5 ^0.40.0 required for Astro 6 peer dep
@astrojs/sitemap ^3.3.0 ^3.7.3 Astro 6 compatibility
devalue 5.6.4 5.8.1 (via Astro 6) CVE-2026-42570
vite (override) ^6.4.2 ^7.3.5 CVE-2026-53571, 53632
js-yaml (override) — ^4.2.0 CVE-2026-53550
postcss (override) — ^8.5.10 (resolved 8.5.15) CVE-2026-41305

Config migration (astro.config.mjs)

Required by the Starlight major bump:

  • social config migrated to array form (Starlight 0.33 syntax change)
  • 8 autogenerated sidebar groups with a label wrapped in items arrays (autogenerated groups removed in Starlight 0.39): Binding, Rendering, Middleware, Logging, Server Configuration, Build Tags, FAQ, Blog

Verification

  • Clean npm install succeeds
  • npm run build produces all 1226 pages
  • npm ls confirms a single patched copy of each flagged package

Notes

  • This is a major Astro + Starlight upgrade. Recommend a visual spot-check of the rendered site (sidebar, GitHub social link in header) before merging.
  • npm audit still reports 4 low-severity esbuild dev-server issues (Windows-only, dev-only) — not in the Trivy report and only fixable by Astro 7, which Starlight does not yet support.

🤖 Generated with Claude Code

appleboy added 2 commits June 22, 2026 20:11
- Upgrade astro to 6.4.8 to fix reflected XSS, host header SSRF, and define:vars XSS
- Upgrade starlight to 0.40.0 and sitemap to 3.7.3 for astro 6 compatibility
- Pull patched devalue 5.8.1 via astro 6 to fix sparse array memory DoS
- Override vite to 7.3.5 to fix server.fs.deny bypass and NTLMv2 hash disclosure
- Override js-yaml to 4.2.0 and postcss to 8.5.10 to fix DoS and XSS
- Migrate social config to array form for starlight 0.33 syntax change
- Wrap autogenerated sidebar groups in items arrays for starlight 0.39 removal
- Update workflow matrix to node 22 to satisfy astro 6 engine requirement
@appleboy
appleboy merged commit b7017e4 into master Jun 23, 2026
3 checks passed
@appleboy
appleboy deleted the fix/astro-6-security-upgrade branch June 23, 2026 02:12
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