From f38a8cc677bcae43bab91d1c08d8c2956aead0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Smoli=C5=84ski?= Date: Tue, 1 Dec 2026 23:54:52 +0100 Subject: [PATCH] =?UTF-8?q?Overrides=20for=20two=20advisories=20published?= =?UTF-8?q?=202026-12-01:=20ws=20below=208.23.0=20(GHSA-37g9-w4hg-h9qr,=20?= =?UTF-8?q?high,=20via=20payload)=20and=20cross-spawn=20below=207.1.0=20(G?= =?UTF-8?q?HSA-ghv9-86vm-4v8m,=20critical,=20Windows=20only,=20via=20cross?= =?UTF-8?q?-env=20/=20eslint)=20in=20the=20plugin=20and=20the=20reference?= =?UTF-8?q?=20site=20(and=20so=20the=20starter);=20doctor=20transitive-min?= =?UTF-8?q?,=20AGENT.md=20=C2=A74=20item=2012,=20setup=20and=20upgrade=20s?= =?UTF-8?q?kills,=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- docs/CHANGELOG.md | 8 ++++++ docs/agent/AGENT.md | 14 ++++++++-- docs/agent/skills/iapl-setup/SKILL.md | 5 ++-- docs/agent/skills/iapl-upgrade/SKILL.md | 5 +++- package.json | 4 ++- pnpm-lock.yaml | 28 ++++++++++--------- reference/.agents/skills/iapl-setup/SKILL.md | 5 ++-- .../.agents/skills/iapl-upgrade/SKILL.md | 5 +++- reference/package.json | 4 ++- reference/pnpm-lock.yaml | 20 +++++++------ src/modules/doctor/rules/versions.ts | 16 +++++++++++ test/doctor.test.ts | 12 ++++++++ 12 files changed, 93 insertions(+), 33 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 4266cd2..69a7684 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -177,6 +177,14 @@ This heading and the 1.17.2 section below (never released on its own) become one > React's RSC advisory GHSA-xqc2-xf4c-x3h3 (checked in the code, AGENT.md §4 item 11). Silence with a reason in > `iapl-doctor.json` → `rules.next-min` if an upgrade must wait. > +> 9. **`ws` below 8.23.0 and `cross-spawn` below 7.1.0 are reported** (GHSA-37g9-w4hg-h9qr, high: memory exhaustion through unbounded automatic pong +> responses, published 2026-12-01). It comes with `payload` (`^8.16.0`); a lockfile made earlier keeps 8.21 / 8.22. +> `iapl-doctor` (`transitive-min`) warns and `pnpm audit --prod` shows it as high. Fix: add +> `"ws@>=8 <8.23.0": "^8.23.0"` to `pnpm.overrides` (AGENT.md §4 item 12), `pnpm install`, commit the lockfile, +> 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"`. +> > **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. > The reference site and every new site from `iapl create` do it for Company → Profiles (also in the `sameAs` of the diff --git a/docs/agent/AGENT.md b/docs/agent/AGENT.md index a20eade..77b46c7 100644 --- a/docs/agent/AGENT.md +++ b/docs/agent/AGENT.md @@ -576,12 +576,20 @@ No abbreviations (`HeroSection`, not `HeroSec`). Do not create `lib/pages.ts`, in CI and in Coolify (Nixpacks takes the major from `engines` / `.nvmrc` and the patch from its own release: check `node -v` in the app's Terminal; below 22.23.5, update Coolify before moving to Payload 3.94). Run `pnpm audit --prod`. The plugin's own dependencies are clean; what remains comes from Payload's tree, which only - the project's lockfile can fix. With `payload` **3.94.x** two packages are still pinned below a fix and need - `pnpm.overrides` next to the `@payloadcms/*` ones: + the project's lockfile can fix. With `payload` **3.94.x** four packages are still below a fix in a lockfile and + need `pnpm.overrides` next to the `@payloadcms/*` ones: ```json + "cross-spawn@>=7 <7.1.0": "^7.1.2", "dompurify@<3.4.17": "^3.4.17", - "happy-dom@<21.0.4": "^21.0.4" + "happy-dom@<21.0.4": "^21.0.4", + "ws@>=8 <8.23.0": "^8.23.0" ``` + `ws` comes from `payload` (`^8.16.0`): GHSA-37g9-w4hg-h9qr (high, memory exhaustion through unbounded automatic + pong responses, published 2026-12-01) is fixed in 8.23.0. Payload's range allows it, but a lockfile made earlier + keeps 8.21 / 8.22 until it is updated; the override lifts it in every lockfile and does nothing once it resolves + 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. `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 diff --git a/docs/agent/skills/iapl-setup/SKILL.md b/docs/agent/skills/iapl-setup/SKILL.md index 7aba266..df834d1 100644 --- a/docs/agent/skills/iapl-setup/SKILL.md +++ b/docs/agent/skills/iapl-setup/SKILL.md @@ -100,8 +100,9 @@ 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 **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 `dompurify` and `happy-dom` overrides -from AGENT.md §4 item 12 (`"happy-dom@<21.0.4": "^21.0.4"` fixes two high advisories Lexical still brings in). On an +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 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 diff --git a/docs/agent/skills/iapl-upgrade/SKILL.md b/docs/agent/skills/iapl-upgrade/SKILL.md index f860f2b..2a3ec2c 100644 --- a/docs/agent/skills/iapl-upgrade/SKILL.md +++ b/docs/agent/skills/iapl-upgrade/SKILL.md @@ -187,11 +187,14 @@ Postgres/SQLite run `pnpm payload migrate:create` anyway and commit it if it is saves; `pnpm exec iapl-doctor` → no `versions` finding; Coolify app → Terminal → `node -v` → 22.23.5 or later. **Every upgrade — dependency advisories** (AGENT.md §4 item 12): `pnpm audit --prod`; on Payload 3.94.x add the -`dompurify` and `happy-dom` overrides to `pnpm.overrides`; on an older Payload also `mongoose` (MongoDB sites; 3.90–3.93 +`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 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", "dompurify@<3.4.17": "^3.4.17", "happy-dom@<21.0.4": "^21.0.4", +"ws@>=8 <8.23.0": "^8.23.0", "mongoose@>=8 <8.24.7": "~8.24.10", "undici@>=7 <7.30.1": "^7.30.1" ``` diff --git a/package.json b/package.json index c90729d..e1766d3 100644 --- a/package.json +++ b/package.json @@ -224,13 +224,15 @@ "overrides": { "baseline-browser-mapping@<2.11.0": "^2.11.0", "browserslist@<4.28.7": "^4.28.7", + "cross-spawn@>=7 <7.1.0": "^7.1.2", "dompurify@<3.4.17": "^3.4.17", "fast-copy@<3.1.0": "^3.1.0", "fast-uri@<3.1.9": "^3.1.9", "happy-dom@<21.0.4": "^21.0.4", "js-yaml@>=4 <4.3.2": "^4.3.2", "source-map-js@<1.2.2": "^1.2.2", - "undici@>=7 <7.30.1": "^7.30.1" + "undici@>=7 <7.30.1": "^7.30.1", + "ws@>=8 <8.23.0": "^8.23.0" } }, "peerDependenciesMeta": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 61505a3..92be93a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,7 @@ settings: overrides: baseline-browser-mapping@<2.11.0: ^2.11.0 browserslist@<4.28.7: ^4.28.7 + cross-spawn@>=7 <7.1.0: ^7.1.2 dompurify@<3.4.17: ^3.4.17 fast-copy@<3.1.0: ^3.1.0 fast-uri@<3.1.9: ^3.1.9 @@ -14,6 +15,7 @@ overrides: js-yaml@>=4 <4.3.2: ^4.3.2 source-map-js@<1.2.2: ^1.2.2 undici@>=7 <7.30.1: ^7.30.1 + ws@>=8 <8.23.0: ^8.23.0 importers: @@ -3185,8 +3187,8 @@ packages: engines: {node: '>=20'} hasBin: true - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + cross-spawn@7.1.2: + resolution: {integrity: sha512-8BPK2r+sKWC8sDinRwLwrFMq2lXTBBwzYYEB9LiCznfMurOi4FOvQflq3XOLGG+HPdMSVpe+k/s96+AtDEOgPg==} engines: {node: '>= 8'} crypt@0.0.2: @@ -6037,8 +6039,8 @@ packages: resolution: {integrity: sha512-OTIk8iR8/aCRWBqvxrzxR0hgxWpnYBblY1S5hDWBQfk/VFmJwzmJgQFN3WsoUKHISv2eAwe+PpbUzyL1CKTLXg==} engines: {node: ^20.17.0 || >=22.9.0} - ws@8.21.0: - resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + ws@8.23.1: + resolution: {integrity: sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -7521,7 +7523,7 @@ snapshots: '@libsql/isomorphic-ws@0.1.5': dependencies: '@types/ws': 8.18.1 - ws: 8.21.0 + ws: 8.23.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -9296,9 +9298,9 @@ snapshots: cross-env@10.1.0: dependencies: '@epic-web/invariant': 1.0.0 - cross-spawn: 7.0.6 + cross-spawn: 7.1.2 - cross-spawn@7.0.6: + cross-spawn@7.1.2: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 @@ -10093,7 +10095,7 @@ snapshots: '@types/json-schema': 7.0.15 ajv: 6.15.0 chalk: 4.1.2 - cross-spawn: 7.0.6 + cross-spawn: 7.1.2 debug: 4.4.3 escape-string-regexp: 4.0.0 eslint-scope: 8.4.0 @@ -10132,7 +10134,7 @@ snapshots: '@types/estree': 1.0.9 ajv: 6.15.0 chalk: 4.1.2 - cross-spawn: 7.0.6 + cross-spawn: 7.1.2 debug: 4.4.3 escape-string-regexp: 4.0.0 eslint-scope: 8.4.0 @@ -10194,7 +10196,7 @@ snapshots: execa@8.0.1: dependencies: - cross-spawn: 7.0.6 + cross-spawn: 7.1.2 get-stream: 8.0.1 human-signals: 5.0.0 is-stream: 3.0.0 @@ -10503,7 +10505,7 @@ snapshots: buffer-image-size: 0.6.4 entities: 7.0.1 whatwg-mimetype: 3.0.0 - ws: 8.21.0 + ws: 8.23.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -11568,7 +11570,7 @@ snapshots: tsx: 4.23.15 undici: 7.30.1 uuid: 13.0.2 - ws: 8.21.0 + ws: 8.23.1 transitivePeerDependencies: - bufferutil - supports-color @@ -12703,7 +12705,7 @@ snapshots: dependencies: signal-exit: 4.1.0 - ws@8.21.0: {} + ws@8.23.1: {} wsl-utils@1.0.1: dependencies: diff --git a/reference/.agents/skills/iapl-setup/SKILL.md b/reference/.agents/skills/iapl-setup/SKILL.md index 7aba266..df834d1 100644 --- a/reference/.agents/skills/iapl-setup/SKILL.md +++ b/reference/.agents/skills/iapl-setup/SKILL.md @@ -100,8 +100,9 @@ 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 **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 `dompurify` and `happy-dom` overrides -from AGENT.md §4 item 12 (`"happy-dom@<21.0.4": "^21.0.4"` fixes two high advisories Lexical still brings in). On an +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 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 diff --git a/reference/.agents/skills/iapl-upgrade/SKILL.md b/reference/.agents/skills/iapl-upgrade/SKILL.md index f860f2b..2a3ec2c 100644 --- a/reference/.agents/skills/iapl-upgrade/SKILL.md +++ b/reference/.agents/skills/iapl-upgrade/SKILL.md @@ -187,11 +187,14 @@ Postgres/SQLite run `pnpm payload migrate:create` anyway and commit it if it is saves; `pnpm exec iapl-doctor` → no `versions` finding; Coolify app → Terminal → `node -v` → 22.23.5 or later. **Every upgrade — dependency advisories** (AGENT.md §4 item 12): `pnpm audit --prod`; on Payload 3.94.x add the -`dompurify` and `happy-dom` overrides to `pnpm.overrides`; on an older Payload also `mongoose` (MongoDB sites; 3.90–3.93 +`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 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", "dompurify@<3.4.17": "^3.4.17", "happy-dom@<21.0.4": "^21.0.4", +"ws@>=8 <8.23.0": "^8.23.0", "mongoose@>=8 <8.24.7": "~8.24.10", "undici@>=7 <7.30.1": "^7.30.1" ``` diff --git a/reference/package.json b/reference/package.json index cabb885..89fab60 100644 --- a/reference/package.json +++ b/reference/package.json @@ -65,8 +65,10 @@ "@payloadcms/richtext-lexical": "3.94.1", "@payloadcms/storage-s3": "3.94.1", "@payloadcms/ui": "3.94.1", + "cross-spawn@>=7 <7.1.0": "^7.1.2", "dompurify@<3.4.17": "^3.4.17", - "happy-dom@<21.0.4": "^21.0.4" + "happy-dom@<21.0.4": "^21.0.4", + "ws@>=8 <8.23.0": "^8.23.0" } }, "dependenciesMeta": { diff --git a/reference/pnpm-lock.yaml b/reference/pnpm-lock.yaml index 6306fc5..d75c0f9 100644 --- a/reference/pnpm-lock.yaml +++ b/reference/pnpm-lock.yaml @@ -13,8 +13,10 @@ overrides: '@payloadcms/richtext-lexical': 3.94.1 '@payloadcms/storage-s3': 3.94.1 '@payloadcms/ui': 3.94.1 + cross-spawn@>=7 <7.1.0: ^7.1.2 dompurify@<3.4.17: ^3.4.17 happy-dom@<21.0.4: ^21.0.4 + ws@>=8 <8.23.0: ^8.23.0 importers: @@ -1428,8 +1430,8 @@ packages: engines: {node: '>=20'} hasBin: true - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + cross-spawn@7.1.2: + resolution: {integrity: sha512-8BPK2r+sKWC8sDinRwLwrFMq2lXTBBwzYYEB9LiCznfMurOi4FOvQflq3XOLGG+HPdMSVpe+k/s96+AtDEOgPg==} engines: {node: '>= 8'} crypt@0.0.2: @@ -2663,8 +2665,8 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@8.22.0: - resolution: {integrity: sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==} + ws@8.23.1: + resolution: {integrity: sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -4151,9 +4153,9 @@ snapshots: cross-env@10.1.0: dependencies: '@epic-web/invariant': 1.0.0 - cross-spawn: 7.0.6 + cross-spawn: 7.1.2 - cross-spawn@7.0.6: + cross-spawn@7.1.2: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 @@ -4377,7 +4379,7 @@ snapshots: buffer-image-size: 0.6.4 entities: 7.0.1 whatwg-mimetype: 3.0.0 - ws: 8.22.0 + ws: 8.23.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -5043,7 +5045,7 @@ snapshots: tsx: 4.23.15 undici: 7.30.1 uuid: 13.0.2 - ws: 8.22.0 + ws: 8.23.1 transitivePeerDependencies: - bufferutil - supports-color @@ -5498,7 +5500,7 @@ snapshots: wrappy@1.0.2: {} - ws@8.22.0: {} + ws@8.23.1: {} xss@1.0.17: dependencies: diff --git a/src/modules/doctor/rules/versions.ts b/src/modules/doctor/rules/versions.ts index 487a798..e838e2d 100644 --- a/src/modules/doctor/rules/versions.ts +++ b/src/modules/doctor/rules/versions.ts @@ -32,6 +32,22 @@ export const TRANSITIVE_MIN_SAFE: { major?: number; min: string; name: string; o severity: 'warning', why: 'GHSA-c8p4-j97h-3vg8 and GHSA-834v-8h66-3h79 (high); comes with @payloadcms/richtext-lexical → @lexical/headless', }, + { + name: 'cross-spawn', + major: 7, + min: '7.1.0', + override: '"cross-spawn@>=7 <7.1.0": "^7.1.2"', + severity: 'warning', + why: 'GHSA-ghv9-86vm-4v8m (critical, command injection when spawning batch files — Windows only); comes with cross-env and eslint', + }, + { + name: 'ws', + major: 8, + min: '8.23.0', + override: '"ws@>=8 <8.23.0": "^8.23.0"', + severity: 'warning', + why: 'GHSA-37g9-w4hg-h9qr (high, memory exhaustion through unbounded automatic pong responses); comes with payload (^8.16.0), a lockfile made before 8.23.0 keeps the old one', + }, ] export const versionRules: DoctorRule[] = [ diff --git a/test/doctor.test.ts b/test/doctor.test.ts index 46f90ac..b4ddd00 100644 --- a/test/doctor.test.ts +++ b/test/doctor.test.ts @@ -361,6 +361,18 @@ describe('versions', () => { expect(rules(await doctor(at('8.24.10', '21.1.0'), ['transitive-min']))).toEqual([]) // another major line (Payload 4 uses mongoose 9) is not compared with the 8.x minimum expect(rules(await doctor(at('9.11.4', '21.0.4'), ['transitive-min']))).toEqual([]) + // ws below 8.23.0 (GHSA-37g9-w4hg-h9qr): a warning; 8.23.0 passes + const wsLock = (v: string) => `lockfileVersion: '9.0'\n\npackages:\n\n ws@${v}:\n resolution: {integrity: x}\n\nsnapshots:\n\n ws@${v}: {}\n` + const wsOld = await doctor(project({ ...base(), 'pnpm-lock.yaml': wsLock('8.21.0') }), ['transitive-min']) + expect(rules(wsOld)).toEqual(['transitive-min:warning']) + expect(wsOld.findings[0].message).toContain('GHSA-37g9-w4hg-h9qr') + expect(wsOld.findings[0].fix).toContain('"ws@>=8 <8.23.0": "^8.23.0"') + expect(rules(await doctor(project({ ...base(), 'pnpm-lock.yaml': wsLock('8.23.1') }), ['transitive-min']))).toEqual([]) + const csLock = (v: string) => `lockfileVersion: '9.0'\n\npackages:\n\n cross-spawn@${v}:\n resolution: {integrity: x}\n\nsnapshots:\n\n cross-spawn@${v}: {}\n` + const csOld = await doctor(project({ ...base(), 'pnpm-lock.yaml': csLock('7.0.6') }), ['transitive-min']) + expect(rules(csOld)).toEqual(['transitive-min:warning']) + expect(csOld.findings[0].fix).toContain('"cross-spawn@>=7 <7.1.0": "^7.1.2"') + expect(rules(await doctor(project({ ...base(), 'pnpm-lock.yaml': csLock('7.1.2') }), ['transitive-min']))).toEqual([]) // no MongoDB adapter, no lexical: nothing to report expect(rules(await doctor(project(base()), ['transitive-min']))).toEqual([]) const silenced = await doctor(at('8.24.1', '20.14.6'), ['transitive-min'], { config: { rules: { 'transitive-min': { off: true, reason: 'Payload upgrade booked' } } } })