Skip to content

fix(website): upgrade astro to 7.4 and sharp to 0.35.5 for Dependabot alerts - #34

Merged
amondnet merged 2 commits into
mainfrom
fix/website-astro-sharp-alerts
Oct 17, 2026
Merged

amondnet merged 2 commits into
mainfrom
fix/website-astro-sharp-alerts

Conversation

@amondnet

@amondnet amondnet commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

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.
  • Companion bumps required by astro 7: @astrojs/starlight ^0.36.0 → ^0.42.6 (peer astro ^7.2.10) and starlight-theme-black ^0.6.0 → ^0.7.1 (peer @astrojs/starlight >=0.41).
  • One migration edit in astro.config.mjs: Starlight 0.39.0 removed autogenerated sidebar groups, so the Services group now wraps it as items: [{ 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).
  • Adds "overrides": { "sharp": "^0.35.5" }. Without it, wrangler 4.107.0's miniflare pins sharp 0.34.5 exactly, which leaves a vulnerable copy (and libvips 1.2.x) in website/bun.lock. Newer miniflare only goes to 0.35.2, so bumping wrangler would not fix it. With the override the lockfile holds a single sharp@0.35.5.

Related issue

None — Dependabot alerts: https://github.com/pleaseai/emulate/security/dependabot

Checklist

  • PR title follows Conventional Commits
  • Tests added or updated, and the suite passes (bun run test) — n/a, website/ only; verified by building the site (below)
  • Lint/format pass (bun run lint)
  • Documentation updated if behavior changed — no content changes
  • No breaking change, or a BREAKING CHANGE: note is included

Test plan

Run in website/ after each commit (each commit builds on its own):

  • bun install --frozen-lockfile is clean (the Docs workflow uses it)
  • bun scripts/sync-services.ts leaves src/content/docs/services unchanged
  • bun run build succeeds: 22 pages, Pagefind index and sitemap generated
  • find dist -name '*.html' | sort is identical to the build of main before the change (22 routes)
  • bun.lock has a single astro@7.4.0 and a single sharp@0.35.5; no sharp@0.34 or libvips 1.2.x left
  • wrangler --version still runs (4.107.0) with the sharp override

Notes

  • astro 7.4 requires Node >=22.22.0. mise.toml pins node = "22", which mise resolves to the latest 22.x (22.23.2 locally), so CI meets it.
  • The build prints two content warnings (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 on main.
  • The Docs workflow deploys a Cloudflare Pages preview for this PR — worth a visual check of the sidebar and theme there.

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).
  • Companion bumps @astrojs/starlight to ^0.42.6 and starlight-theme-black to ^0.7.1 to satisfy astro 7 peer requirements.
  • sharp ^0.34.0 → ^0.35.5 fixes libvips, libheif, and librsvg advisories; an overrides entry forces a single sharp 0.35.5 because wrangler's miniflare pins 0.34.5 exactly.

Migration

  • Starlight 0.39 removed autogenerated sidebar groups; the Services group in astro.config.mjs now wraps autogenerate in an items array with no change to the rendered sidebar.
  • astro 7.4 requires Node >=22.22.0; mise.toml pins node = "22", so CI qualifies.

Written for commit edaa11f. Summary will update on new commits.

Turn on auto-fix

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.
@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
Updatedstarlight-theme-black@​0.6.0 ⏵ 0.7.178 +310080 +189 +9100
Updated@​astrojs/​starlight@​0.36.3 ⏵ 0.42.69910085 +196 -1100
Updatedastro@​5.18.2 ⏵ 7.4.098 +1100 +7588 +197100
Updatedsharp@​0.34.5 ⏵ 0.35.597 +5100 +31100 +194100

View full report

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.

@sonarqubecloud

Copy link
Copy Markdown

@amondnet
amondnet marked this pull request as ready for review October 17, 2026 08:30

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; no actionable issues were established.

Summary

Updates the docs site to Astro 7.4, Starlight 0.42.6, and starlight-theme-black 0.7.1.

  • The docs site upgrades Astro and Sharp to patched dependency versions.

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 amondnet: the build reports warnings about the empty i18n collection and missing docs → 404 entry. The PR description states that the 404 page still builds and that comparison with the base branch remains unconfirmed.

Reviews (1) · Last reviewed commit: "fix(website): upgrade sharp to 0.35.5 fo..." · Reviewed by Greptile

@amondnet
amondnet merged commit 75c937f into main Oct 17, 2026
9 of 10 checks passed
@amondnet
amondnet deleted the fix/website-astro-sharp-alerts branch October 17, 2026 14: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