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:
co-authored by
Claude Opus 5.5
parent
f38a8cc677
commit
b9bcd55ac4
+7
-2
@@ -184,6 +184,10 @@ This heading and the 1.17.2 section below (never released on its own) become one
|
||||
> redeploy. The plugin, the reference site and new sites from `iapl create` carry it. The same for `cross-spawn`
|
||||
> below 7.1.0 (GHSA-ghv9-86vm-4v8m, critical, command injection when spawning batch files — Windows only; comes
|
||||
> with `cross-env` and `eslint`): `"cross-spawn@>=7 <7.1.0": "^7.1.2"`.
|
||||
> **Postgres sites:** `esbuild` below 0.25 (GHSA-67mh-4wv8-2f99, moderate) comes with `@payloadcms/db-postgres` →
|
||||
> `drizzle-kit`; `transitive-min` warns, fix `"esbuild@<0.25.0": "^0.25.12"`. The plugin's own dev tooling is clean
|
||||
> too now (`eslint` 9.39.4 and `minimatch` 11.0.10 through overrides); AGENT.md §4 item 12 lists them for a project
|
||||
> that uses `@payloadcms/eslint-config`.
|
||||
>
|
||||
> **Recommended for projects:** a text field of your own whose value goes into `href` (social profiles, a website)
|
||||
> becomes `buildUrlField()` and its render goes through `safeHref()` (F2) — no schema change, it stays a text column.
|
||||
@@ -201,8 +205,9 @@ This heading and the 1.17.2 section below (never released on its own) become one
|
||||
> Playwright template `iapl-audit/resources/attack-probes.spec.template.ts`. Exported: `ATTACK_PROBES`,
|
||||
> `runAttackProbes`, `createProbeContext`, `scanCode`, `scanConfigs` (`@intecion/ipal-kit/doctor`). A site on the
|
||||
> 1.18.0 defaults passes every probe; `markdown-vary`, `unbounded-list` or `sort-operator` mean a fix above is off.
|
||||
> - **For the plugin's own release:** `pnpm security:gate` (in `prepublishOnly`): `pnpm audit --prod` with no high /
|
||||
> critical, the static-rule gate and the per-class tests; `--zap <url>` adds an optional OWASP ZAP baseline scan.
|
||||
> - **For the plugin's own release:** `pnpm security:gate` (in `prepublishOnly`): `pnpm audit` with no moderate, high
|
||||
> or critical advisory in the production tree **and the dev tooling** (lows reported; `--audit-level high` or
|
||||
> `--prod-only` for the looser rule), the static-rule gate and the per-class tests; `--zap <url>` adds an optional OWASP ZAP baseline scan.
|
||||
>
|
||||
> **New exports:** `buildQueryGuardHook`, `applyQueryGuard`, `capListLimit`, `isOperatorSort`, `isStaffRequest`,
|
||||
> `RefusedSortError`, `DEFAULT_LIST_LIMIT`, `isQueryGuardHook`, `QUERY_GUARD_MARK`, `applyLockedDocumentsAccess`,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
+1
-1
@@ -1453,7 +1453,7 @@ Four suites, each runnable by a project on its own site. The plugin repository r
|
||||
| **Static rules** over the project's own code and config | `pnpm exec iapl-doctor --only security` (rules `code-patterns`, `config-dangerous`) | `test/securityPatterns.test.ts`: every hit in `src/`, `bin/`, `scripts/` and the reference site must be judged in `test/security-patterns.allow.json` (one reason per file and rule; a new place or a higher count fails) |
|
||||
| **Per-class tests** of the building blocks | — (the plugin's own) | `test/securityClasses.test.ts`: XSS payloads into JSON-LD, first-paint scripts, links, rich text, sitemap; open redirects; prototype pollution; log injection; body and batch caps; cache poisoning |
|
||||
| **HTTP attack probes** against a running site | live: `pnpm exec iapl-doctor --url https://<domain> --only live-probes` (changes nothing); local / staging: `.agents/skills/iapl-audit/resources/attack-probes.spec.template.ts` → `tests/attack-probes.spec.ts` | `reference/e2e/attack-probes.spec.ts` in `pnpm e2e:built`, after a webpack and a Turbopack production build, beside the closed-doors spec |
|
||||
| **Dependency audit** | the doctor's `deps-audit` (`pnpm audit --prod`, error on high / critical) | `pnpm security:gate` (also in `prepublishOnly`): `pnpm audit --prod` with no high / critical, then the two vitest suites; `--zap <url>` adds an OWASP ZAP baseline scan when the image `ghcr.io/zaproxy/zaproxy:stable` is already on the machine (offline; never pulled by the script) |
|
||||
| **Dependency audit** | the doctor's `deps-audit` (`pnpm audit --prod`, error on high / critical) | `pnpm security:gate` (also in `prepublishOnly`): `pnpm audit` with no moderate, high or critical advisory in the production tree and the dev tooling (lows reported; `--audit-level high` = only high / critical fail, `--audit-level low` = lows too, `--prod-only` = the dev tooling only reported), then the two vitest suites; `--zap <url>` adds an OWASP ZAP baseline scan when the image `ghcr.io/zaproxy/zaproxy:stable` is already on the machine (offline; never pulled by the script) |
|
||||
|
||||
**Static rules** (`code-*`, one finding per rule and file, seeds / migrations / scripts / tests left out where the
|
||||
rule is about requests):
|
||||
|
||||
Reference in New Issue
Block a user