Skip to content

fix(security): resolve npm audit vulnerabilities#66

Merged
FenjuFu merged 1 commit into
mainfrom
fix-security
Jul 24, 2026
Merged

fix(security): resolve npm audit vulnerabilities#66
FenjuFu merged 1 commit into
mainfrom
fix-security

Conversation

@dongjiang1989

@dongjiang1989 dongjiang1989 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves all 10 npm audit vulnerabilities on the repository, bringing the count from 10 → 0.

ref: https://github.com/iflytek/website/security/dependabot

Fixed

Changed

  • astro ^6.4.8 → ^7.1.3 (major — Astro 7 ships with Vite 8 + Rolldown)
  • @astrojs/vercel ^10.0.8 → ^11.0.3
  • @astrojs/mdx ^6.0.3 → ^7.0.3
  • astro-compress ^2.3.8 → ^2.4.1
  • Added npm overrides: svgo >=4.0.2, sharp ^0.35.3 to force safe transitive deps
  • Removed conflicting "vite": "^7" override (Astro 7 requires Vite 8)

Compatibility

  • Wrapped BasicScripts.astro top-level <script> in an IIFE — Rolldown strict mode disallows top-level return statements (context)

Test plan

  • npm audit → 0 vulnerabilities
  • npm run check (astro check + eslint + prettier) → all pass
  • npm run build → success
  • npm run license:check → pass
  • npm run dev → site renders correctly at http://localhost:4321
  • CHANGELOG.md updated under [Unreleased]

…gh, 3 moderate)

- Upgrade astro 6.x → 7.1.3 (fixes 3 XSS: reflected, spread attr, transition directives)
- Upgrade @astrojs/vercel 10.x → 11.0.3, @astrojs/mdx 6.x → 7.0.3
- Upgrade astro-compress 2.3.8 → 2.4.1
- Add npm overrides for svgo >=4.0.2 and sharp ^0.35.3 to force safe transitive deps
- Remove conflicting vite ^7 override (Astro 7 requires Vite 8)
- Wrap BasicScripts.astro top-level <script> in IIFE for Rolldown strict mode
- Fixes: tar PAX path confusion, sharp libvips CVEs, svgo removeScripts bypass,
  brace-expansion DoS, fast-uri host confusion

Resolves: npm audit 10 → 0 vulnerabilities
Signed-off-by: dongjiang <dongjiang1989@126.com>
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website Ready Ready Preview, Comment Jul 24, 2026 3:41am

@dongjiang1989 dongjiang1989 changed the title fix(security): resolve 10 npm audit vulnerabilities (1 critical, 6 high, 3 moderate) fix(security): resolve npm audit vulnerabilities Jul 24, 2026

@FenjuFu FenjuFu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the dependency updates, Astro 7 compatibility change, and changelog entry. No blocking issues found; all required checks pass.

@FenjuFu
FenjuFu merged commit 1997884 into main Jul 24, 2026
12 checks passed
@dongjiang1989
dongjiang1989 deleted the fix-security branch July 24, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants