You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: keep next-sitemap out of production audit #207
The Audit job of CI (npm audit --omit=dev --audit-level=high) fails on every PR (e.g. #191, #206), so CI passed fails and nothing can be merged. The finding is GHSA-fc5q-39xc-vjpf (high, ReDoS in picomatch), reached through the only production path to picomatch:
The advisory lists picomatch <= 4.0.7 with no patched version, and 4.0.7 is the latest release, so an npm overrides entry can't pin a fixed version.
GitHub withdrew the advisory on 2026-11-18 at 15:38 UTC. The npm registry still reported it at 15:58 UTC; once npm syncs, the job should pass again without changes. That fixes today's failure, but the next advisory in this glob chain would block every PR again.
npm audit fix --force suggests next-sitemap@4.0.9, a downgrade.
next-sitemap only runs as the postbuild CLI. Nothing imports it at runtime, and the standalone server in the Docker image doesn't include it. Vercel and the Dockerfile (npm ci) both install devDependencies for the build.
Proposal: move next-sitemap from dependencies to devDependencies. That's a one-line change in package.json plus the lockfile. It keeps the sitemap and robots.txt output as it is, and it takes the whole fast-glob/micromatch/picomatch chain out of the production audit (all other picomatch copies are already dev-only). It also stops the audit from flagging build-only tools in general. If we'd rather drop the dependency entirely, Next's built-in app/sitemap.ts and app/robots.ts could replace next-sitemap in a larger follow-up.
Acceptance:
npm audit --omit=dev --audit-level=high passes, and npm ls picomatch --omit=dev is empty.
npm run build still writes sitemap.xml, sitemap-0.xml and robots.txt, also in the Docker image build.
The README says where next-sitemap lives and why, if it lists dependencies or the audit policy.
Activity