Repository navigation
fix(website): upgrade astro to 7.4 and sharp to 0.35.5 for Dependabot alerts - #34
Conversation
Upgrade the docs site to astro 7.4.0, which is the first line carrying the fix for GHSA-26w7-cxv4-gfx2 (critical, remote code execution through AVIF image optimization; no 5.x/6.x backport). The same upgrade also clears the other open astro advisories (XSS, SSRF, auth bypass, replay), all patched at or below 7.2.8. Companion bumps required by astro 7: - @astrojs/starlight ^0.36.0 -> ^0.42.6 (peer: astro ^7.2.10) - starlight-theme-black ^0.6.0 -> ^0.7.1 (peer: @astrojs/starlight >=0.41) @astrojs/markdown-remark is an optional peer and is not used, so it is not added. Migration: Starlight 0.39.0 requires autogenerated sidebar groups to wrap `autogenerate` in an `items` array, so the Services group in astro.config.mjs is updated accordingly (same sidebar output).
…isories Bump sharp to ^0.35.5 to fix: - GHSA-wq5f-xc86-pv6w - GHSA-rgj7-g3m4-5g8c - GHSA-f88m-g3jw-g9cj wrangler's miniflare pins sharp 0.34.5 exactly (dev-only), which would leave a vulnerable copy in the lockfile, so add a bun `overrides` entry forcing sharp ^0.35.5 across the whole tree.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
There was a problem hiding this comment.
No issues found across 3 files
Architecture diagram
sequenceDiagram
participant Dev as Local Dev / CI
participant Mise as mise.toml (Node 22.x)
participant Bun as Bun Lockfile
participant Wrangler as Wrangler 4.107.0
participant Astro as Astro 7.4 Build
participant Starlight as Starlight 0.42.6
participant Sharp as sharp 0.35.5
participant Dist as Static Dist Output
participant Pages as Cloudflare Pages
participant Crawler as Pagefind/Sitemap
Note over Dev,Pages: Docs Site Architecture (Current State)
Dev->>Mise: node = "22" (resolves >= 22.22.0)
Mise-->>Dev: Node 22.23.2
Dev->>Bun: bun install --frozen-lockfile
Bun->>Bun: Single astro@7.4.0 + sharp@0.35.5
Note over Bun: overrides forces sharp to 0.35.5
Bun-->>Wrangler: miniflare pins sharp 0.34.5 -> override applied
Bun-->>Dev: Clean install
Dev->>Astro: bun run build
Astro->>Astro: Load astro.config.mjs
Astro->>Starlight: Integrate (peer astro ^7.2.10)
Starlight->>Starlight: Sidebar "Services" autogenerate (new items wrapper)
Astro->>Sharp: Image optimization pipeline
Sharp->>Sharp: libvips / libheif / librsvg (patched)
Astro->>Astro: Compile 22 pages (SSG)
Astro->>Dist: Write static HTML
Dist->>Crawler: Pagefind index + sitemap
Note over Astro,Dist: Alt branch: content warnings (i18n empty, 404 missing)
Note over Dist,Pages: Expected output (22 HTML files)
Dev->>Pages: wrangler pages deploy dist
Wrangler-->>Pages: Upload dry artifacts
Pages-->>Dev: Preview URL (docs workflow)
Dev->>Pages: Visual check on sidebar/theme
Pages-->>Dev: Confirmed rendering
Note over Dist,Pages: Security posture: no vulnerable astro/sharp copies in lockfile
[High impact] The PR appears safe to merge; no actionable issues were established. SummaryUpdates the docs site to Astro 7.4, Starlight 0.42.6, and
Verification was limited to source and configuration checks. No build or browser check was run; installed website dependencies and build output were unavailable. Acknowledged by Reviews (1) · Last reviewed commit: "fix(website): upgrade sharp to 0.35.5 fo..." · Reviewed by Greptile |



Summary
Clears all 13 open Dependabot alerts on
website/package.json(the Astro Starlight docs site), starting with the critical one.Commit 1 — astro (critical first)
astro^5.6.0→^7.4.0. Fixes GHSA-26w7-cxv4-gfx2 (critical: remote code execution through AVIF image optimization), which is patched only in 7.2.8 — there is no 5.x/6.x backport, so this has to cross two majors. It also fixes the other nine astro advisories (XSS, host-header SSRF, base-path authorization bypass, server-island replay), all patched at or below 7.2.8.@astrojs/starlight^0.36.0→^0.42.6(peerastro ^7.2.10) andstarlight-theme-black^0.6.0→^0.7.1(peer@astrojs/starlight >=0.41).astro.config.mjs: Starlight 0.39.0 removed autogenerated sidebar groups, so the Services group now wraps it asitems: [{ autogenerate: { directory: 'services' } }]. Same label, same directory, same pages.Commit 2 — sharp
sharp^0.34.0→^0.35.5. Fixes GHSA-wq5f-xc86-pv6w, GHSA-rgj7-g3m4-5g8c and GHSA-f88m-g3jw-g9cj (libvips / libheif / librsvg)."overrides": { "sharp": "^0.35.5" }. Without it, wrangler 4.107.0'sminiflarepinssharp0.34.5 exactly, which leaves a vulnerable copy (and libvips 1.2.x) inwebsite/bun.lock. Newer miniflare only goes to 0.35.2, so bumping wrangler would not fix it. With the override the lockfile holds a singlesharp@0.35.5.Related issue
None — Dependabot alerts: https://github.com/pleaseai/emulate/security/dependabot
Checklist
bun run test) — n/a,website/only; verified by building the site (below)bun run lint)BREAKING CHANGE:note is includedTest plan
Run in
website/after each commit (each commit builds on its own):bun install --frozen-lockfileis clean (the Docs workflow uses it)bun scripts/sync-services.tsleavessrc/content/docs/servicesunchangedbun run buildsucceeds: 22 pages, Pagefind index and sitemap generatedfind dist -name '*.html' | sortis identical to the build ofmainbefore the change (22 routes)bun.lockhas a singleastro@7.4.0and a singlesharp@0.35.5; nosharp@0.34or libvips 1.2.x leftwrangler --versionstill runs (4.107.0) with the sharp overrideNotes
>=22.22.0.mise.tomlpinsnode = "22", which mise resolves to the latest 22.x (22.23.2 locally), so CI meets it.The collection "i18n" does not exist or is empty,Entry docs → 404 was not found); the 404 page still builds. It is not yet confirmed whether these also appear onmain.Summary by cubic
Upgrades the docs site dependencies to clear all 13 open Dependabot alerts in
website/package.json.astro^5.6.0 → ^7.4.0 fixes a critical AVIF image-optimization RCE (GHSA-26w7-cxv4-gfx2) that has no 5.x/6.x backport, along with the other nine astro advisories (XSS, SSRF, auth bypass, server-island replay).@astrojs/starlightto ^0.42.6 andstarlight-theme-blackto ^0.7.1 to satisfy astro 7 peer requirements.sharp^0.34.0 → ^0.35.5 fixes libvips, libheif, and librsvg advisories; anoverridesentry forces a single sharp 0.35.5 because wrangler'sminiflarepins 0.34.5 exactly.Migration
astro.config.mjsnow wrapsautogeneratein anitemsarray with no change to the rendered sidebar.mise.tomlpinsnode = "22", so CI qualifies.Written for commit edaa11f. Summary will update on new commits.