Audit clean with dev tooling: overrides for esbuild (<0.25, via drizzle-kit), eslint (<9.39.4, @eslint/plugin-kit) and minimatch (7–11.0.7, via typescript-eslint); security:gate fails on moderate and above in the production tree and the dev tooling (--audit-level, --prod-only to loosen); doctor transitive-min warns on esbuild for Postgres sites; AGENT.md §4 item 12, skills, security.md, changelog

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-12-02 00:41:46 +01:00
co-authored by Claude Opus 5.5
parent f38a8cc677
commit b9bcd55ac4
12 changed files with 262 additions and 577 deletions
+7
View File
@@ -590,6 +590,13 @@ No abbreviations (`HeroSection`, not `HeroSec`). Do not create `lib/pages.ts`,
8.23 or later. `iapl-doctor` (`transitive-min`) warns while an older one is installed. `cross-spawn` comes with `cross-env` (the
site's scripts) and `eslint`: GHSA-ghv9-86vm-4v8m (critical, command injection when spawning batch files, Windows
only, published 2026-12-01) is fixed in 7.1.0; Coolify runs Linux, but `pnpm audit --prod` reports it as critical.
**Postgres sites** also add `"esbuild@<0.25.0": "^0.25.12"`: `@payloadcms/db-postgres` → `drizzle-kit` →
`@esbuild-kit/*` brings esbuild 0.18 (GHSA-67mh-4wv8-2f99, moderate: esbuild's own dev server answers any origin;
drizzle-kit never starts that server, but `pnpm audit --prod` lists it). The plugin's own tests run the Postgres
adapter on 0.25 with this override. A project that runs `@payloadcms/eslint-config` also adds
`"eslint@>=9 <9.39.4": "^9.39.4"` and `"minimatch@>=7 <11.0.8": "^11.0.10"` (dev tooling: GHSA-xffm-g5w8-qvg7 in
`@eslint/plugin-kit` 0.2, GHSA-g3hv-75wg-m249 and GHSA-c859-jr93-m5j4 in `minimatch` 9 / 10; the plugin's lint
gives the same results with them).
`happy-dom` comes from `@payloadcms/richtext-lexical` → `@lexical/headless` 0.50 (`^20.9.0`, still so in 3.94.1);
every 20.x has GHSA-c8p4-j97h-3vg8 (high, SSRF when parsing untrusted HTML, fixed in 21.0.0) and
GHSA-834v-8h66-3h79 (high, host code execution, fixed in 21.0.4). 21 is a major, but only
+1 -1
View File
@@ -102,7 +102,7 @@ create-payload-app gave you an older one.
**Node.js 22.23.5 or later** on the 22 line (`"engines": { "node": ">=22.23.5 <23" }`, `.nvmrc` `22`) — Payload 3.94's
minimum, also in Coolify (Nixpacks picks the patch: check `node -v` in the app's Terminal after the first deploy). After the install, `pnpm audit --prod` → no high or critical; add the `cross-spawn`, `dompurify`, `happy-dom` and `ws` overrides
from AGENT.md §4 item 12 (`"happy-dom@<21.0.4": "^21.0.4"` fixes two high advisories Lexical still brings in,
`"ws@>=8 <8.23.0": "^8.23.0"` one in Payload's `ws`). On an
`"ws@>=8 <8.23.0": "^8.23.0"` one in Payload's `ws`; a Postgres site also the `esbuild` one listed there). On an
older Payload also the `mongoose` (MongoDB) and `undici` ones listed there. `pnpm exec iapl-doctor` → no
`transitive-min` finding.
`nodemailer`, `lucide-react`, `slugify`, `server-only` come with the plugin — do not add them (your own
+2 -1
View File
@@ -188,7 +188,8 @@ saves; `pnpm exec iapl-doctor` → no `versions` finding; Coolify app → Termin
**Every upgrade — dependency advisories** (AGENT.md §4 item 12): `pnpm audit --prod`; on Payload 3.94.x add the
`cross-spawn`, `dompurify`, `happy-dom` and `ws` overrides to `pnpm.overrides` (`ws`: GHSA-37g9-w4hg-h9qr, high;
`cross-spawn`: GHSA-ghv9-86vm-4v8m, critical, Windows only; both 1.18.0); on an older Payload also `mongoose` (MongoDB sites; 3.90–3.93
`cross-spawn`: GHSA-ghv9-86vm-4v8m, critical, Windows only; both 1.18.0); a Postgres site also
`"esbuild@<0.25.0": "^0.25.12"` (via drizzle-kit, AGENT.md §4 item 12); on an older Payload also `mongoose` (MongoDB sites; 3.90–3.93
pin 8.24.1, which has a critical advisory, GHSA-pcrw-h46h-c93h, and four more) and `undici` (3.90–3.91):
```json
"cross-spawn@>=7 <7.1.0": "^7.1.2",