Skip to content

Commit 4751a65

Browse files
fix(security): clear the critical and high advisories (#47)
* fix(security): clear the critical and high advisories Propagated from shipkit. Five packages, all with published patches. packages/web sharp 0.32.5 -> ^0.35.4 The critical here is an RCE through AVIF decoding in libheif, which astro reaches via its default sharp image service. The advisory is filed against astro with a fix of 7.2.8, but the vulnerable code is sharp's, so patching sharp closes it without a two-major astro migration. astro 5.7.13 -> ^5.15.8 Reflected XSS via server islands. @astrojs/cloudflare 12.6.3 -> ^12.6.6 packages/opencode minimatch 10.0.3 -> ^10.2.3 packages/console/core mysql2 3.14.4 -> ^3.22.0 Dev scope. root overrides wrangler -> ^4.59.1 Transitive and dev scope. Still open after this: two astro highs that need 6.3.3 and 6.4.6, and the astro alert for the libheif critical, which will keep showing until astro itself moves to 7.2.8 even though the underlying flaw is now patched. Both need a real major migration of packages/web and belong in their own change. `bun turbo typecheck` passes, 8 of 8 tasks. * chore: format code * feat(web): migrate to Astro 6, closing the remaining advisories Astro 5.7.13 carried four advisories. sharp 0.35.4 in the previous commit already closed the critical, because that one is an RCE through AVIF decoding in libheif which astro only reaches via its default sharp image service. This moves the framework itself so the other three close too. astro ^5.15.8 -> ^6.4.8 reflected XSS via server islands (5.15.8), reflected XSS via unescaped slot name (6.3.3), host header SSRF in the prerendered error page fetch (6.4.6) @astrojs/cloudflare ^12.6.6 -> ^13.7.0 peers astro ^6.3.0 @astrojs/starlight 0.34.3 -> ^0.40.0 0.40 is the last line that peers astro ^6; 0.41 requires astro 7 @astrojs/solid-js 5.1.0 -> ^6.0.1 @astrojs/markdown-remark 6.3.1 -> ^6.3.11 Two things had to change for the build to work at all. The catalog pinned vite at 7.1.4 while astro 6 needs ^7.3.2, so astro and the cloudflare adapter resolved a nested vite while starlight and vite-plugin-solid resolved the hoisted one. Virtual modules are registered per vite instance, so the split meant `astro:assets`, `astro:static-paths` and `virtual:astro:app` could not resolve and the build died in rolldown. The catalog now pins 7.3.6 and every package in the plugin chain resolves the same vite. packages/web/wrangler.jsonc is new. @astrojs/cloudflare starts a miniflare worker to prerender routes during the build, and without nodejs_compat that worker cannot resolve the node builtins postcss and expressive-code import, so prerendering failed with `No such module "chunks/path"`. Deployment is still configured by SST in infra/app.ts; this file only affects the build. Astro 7 was tried first and abandoned. It replaces remark/rehype with satteri, whose worker build needs @bruits/satteri-wasm32-wasi, which bun will not install because the package declares cpu: ["wasm32"]. Installing it by hand gets the bundle to build and then fails prerendering with "The WASI method is not implemented". That is an upstream problem, and astro 6 closes every advisory anyway. `bun turbo typecheck` passes 8 of 8. `astro build` completes, including the pagefind index and sitemap. --------- Co-authored-by: GitHub Action <action@github.com>
1 parent 8e77783 commit 4751a65

7 files changed

Lines changed: 1131 additions & 318 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ tmp
1111
*.bun-build
1212
dist
1313
.turbo
14+
.wrangler/

‎bun.lock‎

Lines changed: 1108 additions & 309 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"solid-js": "1.9.9",
3838
"tailwindcss": "4.1.11",
3939
"@tailwindcss/vite": "4.1.11",
40-
"vite": "7.1.4",
40+
"vite": "7.3.6",
4141
"vite-plugin-solid": "2.11.8"
4242
}
4343
},
@@ -73,6 +73,7 @@
7373
"@solidjs/start@1.1.7": "patches/@solidjs%2Fstart@1.1.7.patch"
7474
},
7575
"overrides": {
76+
"wrangler": "^4.59.1",
7677
"@types/bun": "catalog:",
7778
"@types/node": "catalog:"
7879
}

‎packages/console/core/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@types/bun": "1.3.0",
3636
"@types/node": "catalog:",
3737
"drizzle-kit": "0.30.5",
38-
"mysql2": "3.14.4",
38+
"mysql2": "^3.22.0",
3939
"typescript": "catalog:",
4040
"@typescript/native-preview": "catalog:"
4141
}

‎packages/opencode/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"hono-openapi": "1.0.7",
7373
"ignore": "7.0.5",
7474
"jsonc-parser": "3.3.1",
75-
"minimatch": "10.0.3",
75+
"minimatch": "^10.2.3",
7676
"open": "10.1.2",
7777
"remeda": "2.26.0",
7878
"tree-sitter": "0.22.4",

‎packages/web/package.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"@astrojs/cloudflare": "12.6.3",
15-
"@astrojs/markdown-remark": "6.3.1",
16-
"@astrojs/solid-js": "5.1.0",
17-
"@astrojs/starlight": "0.34.3",
14+
"@astrojs/cloudflare": "^13.7.0",
15+
"@astrojs/markdown-remark": "^6.3.11",
16+
"@astrojs/solid-js": "^6.0.1",
17+
"@astrojs/starlight": "^0.40.0",
1818
"@fontsource/ibm-plex-mono": "5.2.5",
1919
"@shikijs/transformers": "3.4.2",
2020
"@types/luxon": "3.6.2",
2121
"ai": "catalog:",
22-
"astro": "5.7.13",
22+
"astro": "^6.4.8",
2323
"diff": "catalog:",
2424
"js-base64": "3.7.7",
2525
"lang-map": "0.4.0",
@@ -28,7 +28,7 @@
2828
"marked-shiki": "1.2.1",
2929
"rehype-autolink-headings": "7.1.0",
3030
"remeda": "catalog:",
31-
"sharp": "0.32.5",
31+
"sharp": "^0.35.4",
3232
"shiki": "3.4.2",
3333
"solid-js": "catalog:",
3434
"toolbeam-docs-theme": "0.4.8"

‎packages/web/wrangler.jsonc‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
// Read by @astrojs/cloudflare for the prerender worker it spins up during
3+
// `astro build`. Without nodejs_compat that worker cannot resolve the node
4+
// builtins that postcss and expressive-code pull in, and prerendering fails
5+
// with `No such module "chunks/path"`.
6+
//
7+
// Deployment itself is configured by SST (infra/app.ts), not this file.
8+
"$schema": "node_modules/wrangler/config-schema.json",
9+
"name": "lash-web",
10+
"compatibility_date": "2026-09-01",
11+
"compatibility_flags": ["nodejs_compat"]
12+
}

0 commit comments

Comments
 (0)