Skip to content

chore(deps): astro 5 → 6 to patch GHSA-j687-52p2-xcff - #2

Open
KirbyInGitHub wants to merge 1 commit into
mainfrom
chore/astro-6-upgrade
Open

KirbyInGitHub wants to merge 1 commit into
mainfrom
chore/astro-6-upgrade

Conversation

@KirbyInGitHub

Copy link
Copy Markdown
Contributor

Summary

  • Bumps astro ^5.6.1 → ^6.1.9 to close GHSA-j687-52p2-xcff (CVE-2026-41067define:vars XSS via incomplete </script> tag sanitization). Patch first lands in astro 6.1.6, no 5.x backport.
  • Bumps @astrojs/mdx ^4.2.2 → ^5.0.4 (peer-pinned to astro ^6).
  • @astrojs/tailwind stays at 6.0.2: its peerDeps still pin astro ^5 but runtime works fine on astro 6. Installed with --legacy-peer-deps. If upstream doesn't relax peer constraint we'll migrate to @tailwindcss/vite in a follow-up.

Practical exposure

define:vars is only used in one place — src/layouts/BaseLayout.astro injecting pageLocale into an inline <script>. The locale value is typed 'en' | 'zh' literal, so the attacker can't influence it through the prop chain. Real exploit surface = 0. Upgrade is purely to close the Dependabot alert and keep the supply chain current.

Test plan

  • npm install --legacy-peer-deps clean
  • npm run build — 29 pages built, exit 0
  • Tailwind output present (44K compiled CSS, OKLCH stone/shell palette emitted)
  • npm run dev smoke (recommend manual check before merge: theme toggle, /zh language switch, blog mdx render)
  • Visual diff on landing / chat / cowork / about (Dropdown nav, hero, §II 蜗牛, footer)

🤖 Generated with Claude Code

修 dependabot CVE-2026-41067 — define:vars XSS via incomplete </script>
tag sanitization. patch 只在 astro 6.1.6 起,无 5.x backport。

实际利用面:BaseLayout.astro 仅一处 define:vars 注入 pageLocale,
locale 类型受 'en' | 'zh' literal 约束,攻击者无法注入 — 但升级是
关掉 dependabot 告警的唯一路径。

bumps:
- astro ^5.6.1 → ^6.1.9
- @astrojs/mdx ^4.2.2 → ^5.0.4 (peers astro ^6)

@astrojs/tailwind 6.0.2 的 peerDependencies 仍卡 astro ^5,但
runtime 在 astro 6 工作正常 — 用 --legacy-peer-deps 装。后续
若官方未升 peer,再迁 @tailwindcss/vite。

build verify: 29 pages 全部生成,44K 编译产物 CSS,OKLCH 色板正常输出。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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