Skip to content

Commit 3f1950f

Browse files
chore(deps): clear 19 Dependabot alerts via security overrides + hey-api bump (#15166)
## Description Fixes FE-1189 Clears **20 of the 24 open Dependabot alerts** on this repo (as of 2026-08-13, per `gh api /repos/Comfy-Org/ComfyUI_frontend/dependabot/alerts?state=open` — the count moves as advisories publish, so re-run that query to reconcile). The 4 deferred alerts are astro ×3 and esbuild ×1, detailed below. Part of the org-wide SOC2 closure (cloud repo: Comfy-Org/cloud#6387, #6460, #6473, #6542). **Security overrides** (extends the existing `# Security overrides` section in `pnpm-workspace.yaml`): - `undici@^7 → ^7.29.0` (5 alerts), `js-yaml@^4 → ^4.3.1` + `js-yaml@^3 → ^3.15.1` (3), `fast-uri@^3 → ^3.1.5` (2), `brace-expansion` on all five published major lines → 1.1.18 / 2.1.4 / 3.0.6 / 5.0.9 (2 open alerts + pre-emptive coverage of the rest), `sharp@^0.34.0 → ^0.35.0` (1) — note this deliberately violates astro 6's `optionalDependencies: sharp ^0.34.0`; astro's exact transform sequence was verified against 0.35.3 in review, and the scoped key starts failing to match (the signal we want) if astro ever moves its range **Catalog / direct bumps:** - `dompurify 3.4.7 → 3.4.13` (5 alerts) — catalog pin **plus** a graph-wide `dompurify@^3.0.0` override so a future transitive narrowing cannot silently reopen these; see the test-environment note below - `@hey-api/openapi-ts 0.93.0 → 0.97.3` (2 alerts) — **pin bump only, no regen**: the advisory's vulnerable `buildClientParams` template is not emitted by this config's plugins, so the pin alone clears both alerts. The earlier raw-spec regen was dropped after review — it re-added internal endpoint literals that the BE-2669 projection strips upstream — and the bot regen channel (#15139) will emit 0.97.3-format output from the projected spec on its own cadence. **Test changes — dompurify ↔ happy-dom incompatibility (FE-1189):** dompurify ≥ 3.4.8 ("fixed the node iterator for better template scrubbing") strips sanitized elements when running under happy-dom — `renderMarkdownToHtml('# Title')` returns `"Title\n"` instead of `<h1>Title</h1>`. Verified by version bisect (3.4.7 ✓ / 3.4.8+ ✗), reproduced on happy-dom 20.9.0 and 20.11.2, and the identical probe under **jsdom returns the correct output** — so real browsers are unaffected; this is a test-env artifact, matching the diagnosis already recorded in FE-1189. The upstream happy-dom issue is already filed: capricorn86/happy-dom#2182. Since 3.4.13 is required to clear all five dompurify advisories, the markdown-rendering test files carry a `// @vitest-environment jsdom` pragma (plus a hoisted `ResizeObserver` stub where needed), and `vitest.setup.ts` now carries a call-time tripwire: any happy-dom test invoking `DOMPurify.sanitize` fails with instructions instead of silently asserting against an inert sanitizer — it immediately caught `ReleaseNotificationToast.test.ts` and `WhatsNewPopup.test.ts`, which now carry the pragma too (seven files total). If #14584 (`SanitizedHtml.vue` centralization) lands, the pragma set should be revisited to match its component coverage. **Deferred (4 alerts, no owner yet):** - `astro` ×3 (`apps/website`): remediation requires `astro ≥ 7.1.0` (CVE-2026-73422 is vulnerable through 7.0.9) — a framework major upgrade from the pinned ^6.4.2 with its own e2e/visual suites; needs an owner, not a pin bump - `esbuild` ×1 (low, GHSA-g7r4-m6w7-qqqr): dev-only and confined to the `apps/website` build chain — the root importer's vite 8.2.1 already resolves esbuild 0.28.1 (vite accepts `^0.27.0 || ^0.28.0`), so only the website's dev-time instance remains on 0.27.7 ## How tested - Full unit suite: **16,037 passed / 8 skipped**; the only failing file is `scripts/cicd/check-binary-size.test.ts`, which fails identically on clean `main` on my machine (missing local tool, exit 127) — pre-existing, unrelated - `pnpm typecheck` (vue-tsc) clean, including the regenerated ingest-types consumers - Lockfile audited instance-by-instance: every flagged package's every instance is on a patched version - See the review below for independent verification: base→head `pnpm audit` drops 29→5 overall and 7→0 with `--prod` --------- Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
1 parent 50a3bb6 commit 3f1950f

11 files changed

Lines changed: 351 additions & 273 deletions

File tree

packages/ingest-types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"zod": "catalog:"
1515
},
1616
"devDependencies": {
17-
"@hey-api/openapi-ts": "0.93.0"
17+
"@hey-api/openapi-ts": "0.97.3"
1818
}
1919
}

pnpm-lock.yaml

Lines changed: 270 additions & 271 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ catalog:
7575
class-variance-authority: ^0.7.1
7676
cross-env: ^10.1.0
7777
cva: 1.0.0-beta.4
78-
dompurify: 3.4.7
78+
dompurify: 3.4.13
7979
dotenv: ^16.4.5
8080
eslint: ^10.8.1
8181
eslint-config-prettier: ^10.1.8
@@ -174,3 +174,14 @@ overrides:
174174
minimatch@^9.0.0: ^9.0.7
175175
minimatch@^10.0.0: ^10.2.3
176176
ajv@^8.0.0: ^8.18.0
177+
undici@^7.0.0: ^7.29.0
178+
dompurify@^3.0.0: ^3.4.13
179+
js-yaml@^4.0.0: ^4.3.1
180+
js-yaml@^3.0.0: ^3.15.1
181+
fast-uri@^3.0.0: ^3.1.5
182+
brace-expansion@^1.0.0: ^1.1.18
183+
brace-expansion@^2.0.0: ^2.1.4
184+
brace-expansion@^3.0.0: ^3.0.6
185+
brace-expansion@^4.0.0: ^5.0.9
186+
brace-expansion@^5.0.0: ^5.0.9
187+
sharp@^0.34.0: ^0.35.0

src/components/graph/widgets/TextPreviewWidget.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// @vitest-environment jsdom
2+
// dompurify is inert under happy-dom — see the tripwire note in
3+
// vitest.setup.ts (capricorn86/happy-dom#2182, FE-1189).
14
import { render, screen } from '@testing-library/vue'
25
import PrimeVue from 'primevue/config'
36
import { beforeEach, describe, expect, it, vi } from 'vitest'

src/components/node/NodePreview.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// @vitest-environment jsdom
2+
// dompurify is inert under happy-dom — see the tripwire note in
3+
// vitest.setup.ts (capricorn86/happy-dom#2182, FE-1189).
14
import { createPinia } from 'pinia'
25
import PrimeVue from 'primevue/config'
36
import { beforeAll, describe, expect, it, vi } from 'vitest'
@@ -11,6 +14,16 @@ import * as markdownRendererUtil from '@/utils/markdownRendererUtil'
1114

1215
import NodePreview from './NodePreview.vue'
1316

17+
// jsdom does not implement ResizeObserver (happy-dom does); stub it before
18+
// component modules construct their module-level observer at import time.
19+
vi.hoisted(() => {
20+
globalThis.ResizeObserver ??= class {
21+
observe() {}
22+
unobserve() {}
23+
disconnect() {}
24+
} as unknown as typeof ResizeObserver
25+
})
26+
1427
describe('NodePreview', () => {
1528
let i18n: ReturnType<typeof createI18n>
1629
let pinia: ReturnType<typeof createPinia>

src/composables/useNodeHelpContent.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// @vitest-environment jsdom
2+
// dompurify is inert under happy-dom — see the tripwire note in
3+
// vitest.setup.ts (capricorn86/happy-dom#2182, FE-1189).
14
import { beforeEach, describe, expect, it, vi } from 'vitest'
25
import { nextTick, ref } from 'vue'
36

src/platform/updates/components/ReleaseNotificationToast.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// @vitest-environment jsdom
2+
// dompurify is inert under happy-dom — see the tripwire note in
3+
// vitest.setup.ts (capricorn86/happy-dom#2182, FE-1189).
14
import { render, screen } from '@testing-library/vue'
25
import userEvent from '@testing-library/user-event'
36
import { beforeEach, describe, expect, it, vi } from 'vitest'

src/platform/updates/components/WhatsNewPopup.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// @vitest-environment jsdom
2+
// dompurify is inert under happy-dom — see the tripwire note in
3+
// vitest.setup.ts (capricorn86/happy-dom#2182, FE-1189).
14
import { render, screen } from '@testing-library/vue'
25
import userEvent from '@testing-library/user-event'
36
import Button from '@/components/ui/button/Button.vue'

src/renderer/extensions/vueNodes/widgets/components/WidgetTextPreview.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// @vitest-environment jsdom
2+
// dompurify is inert under happy-dom — see the tripwire note in
3+
// vitest.setup.ts (capricorn86/happy-dom#2182, FE-1189).
14
import { fromPartial } from '@total-typescript/shoehorn'
25
import { render, screen } from '@testing-library/vue'
36
import userEvent from '@testing-library/user-event'
@@ -22,6 +25,16 @@ const GRAPH_ID = 'graph-1'
2225
const NODE_ID = toNodeId('7')
2326
const LOCATOR = 'loc-1'
2427

28+
// jsdom does not implement ResizeObserver (happy-dom does); stub it before
29+
// component modules construct their module-level observer at import time.
30+
vi.hoisted(() => {
31+
globalThis.ResizeObserver ??= class {
32+
observe() {}
33+
unobserve() {}
34+
disconnect() {}
35+
} as unknown as typeof ResizeObserver
36+
})
37+
2538
const { downloadFileMock, copyMock } = vi.hoisted(() => ({
2639
downloadFileMock: vi.fn(),
2740
copyMock: vi.fn()

src/utils/markdownRendererUtil.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// @vitest-environment jsdom
2+
// dompurify is inert under happy-dom — see the tripwire note in
3+
// vitest.setup.ts (capricorn86/happy-dom#2182, FE-1189).
14
import { describe, expect, it } from 'vitest'
25

36
import { renderMarkdownToHtml } from '@/utils/markdownRendererUtil'

0 commit comments

Comments
 (0)