chore(deps): astro 5 → 6 to patch GHSA-j687-52p2-xcff - #2
Open
KirbyInGitHub wants to merge 1 commit into
Open
KirbyInGitHub wants to merge 1 commit into
KirbyInGitHub wants to merge 1 commit into
Conversation
修 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
astro^5.6.1 → ^6.1.9 to close GHSA-j687-52p2-xcff (CVE-2026-41067 —define:varsXSS via incomplete</script>tag sanitization). Patch first lands in astro 6.1.6, no 5.x backport.@astrojs/mdx^4.2.2 → ^5.0.4 (peer-pinned to astro ^6).@astrojs/tailwindstays 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/vitein a follow-up.Practical exposure
define:varsis only used in one place —src/layouts/BaseLayout.astroinjectingpageLocaleinto an inline<script>. Thelocalevalue 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-depscleannpm run build— 29 pages built, exit 0npm run devsmoke (recommend manual check before merge: theme toggle, /zh language switch, blog mdx render)🤖 Generated with Claude Code