Minimum safe Next.js 16.4.6 (owner's decision): doctor next-min, AGENT.md §4 item 11, doctor.md, setup and upgrade skills, changelog; O1 settled — Next 16.4.6's React copy carries the GHSA-xqc2-xf4c-x3h3 fix (checked in the code)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
dcf820b365
commit
347e3bafa1
+13
-8
@@ -553,19 +553,24 @@ No abbreviations (`HeroSection`, not `HeroSec`). Do not create `lib/pages.ts`,
|
||||
9. **RSC by default.** `'use client'` only for state/interaction, in a separate file;
|
||||
the section stays a server component and passes data to it. Secrets: `import 'server-only'`.
|
||||
10. **Blocks do not import `lib/*`** (cycle). Server-side data → `enhanceProps`.
|
||||
11. **Next.js 16.4.5 or later** (minimum safe version; the plugin, the reference site and the starter use 16.4.6).
|
||||
11. **Next.js 16.4.6 or later** (minimum safe version since 1.18.0; the plugin, the reference site and the starter use 16.4.6).
|
||||
16.0.0–16.4.0 have unauthenticated RCE and DoS advisories (GHSA-2464-fhr4-w9xw, GHSA-673q-mjm6-r5xr,
|
||||
GHSA-p3m5-59mp-jv5r); 16.3.0–16.4.4 have GHSA-mfr8-8qww-v76h (information disclosure across root params when a
|
||||
`'use cache'` function is called through `unstable_cache()`, moderate; fixed in 16.4.5). Payload supports no
|
||||
patched 15.x line. Pin `next` and `eslint-config-next` to the same 16.4.x (≥ 16.4.5):
|
||||
`'use cache'` function is called through `unstable_cache()`, moderate; fixed in 16.4.5). 16.4.6 is the tested
|
||||
version; its React copy carries the fix for React's RSC advisory GHSA-xqc2-xf4c-x3h3 (critical, fixed in
|
||||
`react-server-dom-*` 19.3.1). Payload supports no patched 15.x line. Pin `next` and `eslint-config-next` to the
|
||||
same 16.4.x (≥ 16.4.6):
|
||||
`pnpm add next@16.4.6 eslint-config-next@16.4.6`, and make sure `sharp` resolves to 0.35.5 or later
|
||||
(`pnpm why sharp`). The plugin's peer range stays open (`next >=15`) — the minimum is yours to keep.
|
||||
**Check:** `pnpm ls next sharp` → next ≥ 16.4.5, sharp ≥ 0.35.5; `pnpm exec iapl-doctor` → no `next-min`
|
||||
**Check:** `pnpm ls next sharp` → next ≥ 16.4.6, sharp ≥ 0.35.5; `pnpm exec iapl-doctor` → no `next-min`
|
||||
finding; `pnpm dev` prints no security-upgrade warning.
|
||||
**Watch (security audit 2026-12, O1):** React's RSC advisory GHSA-xqc2-xf4c-x3h3 (critical) is fixed in
|
||||
`react-server-dom-*` 19.3.1; Next vendors its own React copy, and no Next release note or advisory says yet whether
|
||||
16.4.6 carries the fix. When Next publishes one that names it, move to the version it names and raise this
|
||||
minimum; until then `deps-audit` does not flag `next` for it.
|
||||
**GHSA-xqc2-xf4c-x3h3 in Next (security audit 2026-12, O1, settled):** Next vendors its own React copy
|
||||
(`next/dist/compiled/react-server-dom-{webpack,turbopack}`), labelled `19.3.0-canary-278794d7-20261002`. That
|
||||
label is older than the fix, but the code carries it: compared with React's fix commit 0c9913ae (#37846), the
|
||||
vendored server has the new backing-store reads (`getBackingBlob`), stream chunks under their own `"S"` key, and
|
||||
the fix's new error 612 ("Cannot transport a detached buffer"), and none of the old helpers. `pnpm audit` does not
|
||||
flag `next` for it (the advisory names `react-server-dom-*`, not `next`). After a Next upgrade, check the same way:
|
||||
`grep -c "detached buffer" node_modules/next/dist/compiled/react-server-dom-webpack/cjs/*server.node.production.js` → 1.
|
||||
12. **No open production advisories.** Node.js 20 or later for the plugin itself (its `nodemailer` 10 requires it);
|
||||
**Payload 3.94 needs Node.js 22.23.5 or later** on the 22 line (`engines`: `">=22.23.5 <23"`, `.nvmrc` `22`), locally,
|
||||
in CI and in Coolify (Nixpacks takes the major from `engines` / `.nvmrc` and the patch from its own release: check
|
||||
|
||||
@@ -94,8 +94,8 @@ legacy-peer-deps=true
|
||||
pnpm add @intecion/ipal-kit @payloadcms/plugin-seo @payloadcms/plugin-form-builder \
|
||||
@payloadcms/storage-s3 @clocklimited/payload-2fa@3.0.0-beta.7 tailwindcss @tailwindcss/postcss
|
||||
```
|
||||
**Next.js 16.4.5 or later** (minimum safe version: 16.0.0–16.4.0 have critical advisories, 16.3.0–16.4.4 have
|
||||
GHSA-mfr8-8qww-v76h — AGENT.md §4 item 11): `pnpm add [email protected] [email protected] sharp@^0.35.5` when
|
||||
**Next.js 16.4.6 or later** (minimum safe version: 16.0.0–16.4.0 have critical advisories, 16.3.0–16.4.4 have
|
||||
GHSA-mfr8-8qww-v76h; 16.4.6 is the tested version — AGENT.md §4 item 11): `pnpm add [email protected] [email protected] sharp@^0.35.5` when
|
||||
create-payload-app gave you an older one.
|
||||
**Payload 3.94.1** (what the reference site and the starter use; the plugin accepts `^3.90.2`): every `payload` /
|
||||
`@payloadcms/*` on the same exact version, `react` and `react-dom` 19.3.1 (Payload 3.94 requires `^19.3.1`), and
|
||||
@@ -111,7 +111,7 @@ plugin-seo, plugin-form-builder, storage-s3) in `pnpm.overrides` **to the exact
|
||||
`"build": "cross-env NODE_OPTIONS=\"--max-old-space-size=3072\" next build --webpack"`.
|
||||
|
||||
**Check.** `ls node_modules/@intecion/ipal-kit/docs/agent/AGENT.md` exists;
|
||||
`pnpm ls payload @payloadcms/ui @payloadcms/plugin-seo` — one, identical version; `pnpm ls next sharp` → next ≥ 16.4.5,
|
||||
`pnpm ls payload @payloadcms/ui @payloadcms/plugin-seo` — one, identical version; `pnpm ls next sharp` → next ≥ 16.4.6,
|
||||
sharp ≥ 0.35.5; `ls src/middleware.ts` → not found.
|
||||
404 on `pnpm add` = missing `@intecion:registry` line; 401 = stale `_authToken` in `~/.npmrc` (PROGRAMISTA §1).
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
|
||||
`buildGlobalRevalidateHook({ revalidatePath })`; `consentFieldName` passed only because the option was ignored →
|
||||
`forms.consentFieldName` works now; your own seed guard / upsert code → `@intecion/ipal-kit/seed` (`createSeeder`).
|
||||
|
||||
**Every upgrade — Next.js 16.4.5 or later** (AGENT.md §4 item 11): `pnpm ls next sharp`; below 16.4.5 →
|
||||
**Every upgrade — Next.js 16.4.6 or later** (AGENT.md §4 item 11): `pnpm ls next sharp`; below 16.4.6 →
|
||||
`pnpm add [email protected] [email protected] sharp@^0.35.5`, `rm -rf .next`, build, redeploy on Coolify
|
||||
(a new image ships the fixed next and sharp). **Check:** `pnpm exec iapl-doctor` → no `next-min` finding; `pnpm dev`
|
||||
prints no security-upgrade warning.
|
||||
@@ -210,7 +210,7 @@ panel opens and a document saves.
|
||||
`engines`. Remove `nodemailer` and `@types/nodemailer` from the project's own `package.json` if someone added them
|
||||
(the plugin's copy is the one `mailAdapter` uses). **Check:** Site integrations → E-mail sending → send a test
|
||||
e-mail over SMTP (and over Microsoft Graph when the project uses it).
|
||||
3. **Next.js** — the "Every upgrade — Next.js" step above (today 16.4.5 or later, `sharp@^0.35.5`).
|
||||
3. **Next.js** — the "Every upgrade — Next.js" step above (today 16.4.6 or later, `sharp@^0.35.5`).
|
||||
4. **Dependency advisories** — the "Every upgrade — dependency advisories" step above (`dompurify` / `graphql-scalars` /
|
||||
`undici` overrides on payload 3.90.x). **Check:** `pnpm audit --prod` → no high or critical.
|
||||
5. **Cookie list kept by hand** → offer `cookieScanner: true` (+ `crawl: true` with `IAPL_COOKIE_SCAN_URL`,
|
||||
|
||||
Reference in New Issue
Block a user