From 17afdfeb8d258e1cfa70c951200e53296ac3426e Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 25 May 2026 10:48:41 +0000 Subject: [PATCH] Studio: fix two Codex findings on PR 5717 head P1 -- ``scripts/check_new_install_scripts.py``: the head-only rejection only refused new HEAD entries, not deletions. That left a two-step bypass open: 1. PR A removes ``studio/frontend/.install-script-allowlist`` on main (passes, since the lockfile has no new install-script deps). 2. PR B then hits the bootstrap path (base allowlist missing) and self-allowlists any newly introduced install-script dependency, because bootstrap mode accepts head as-is. Now also fail when head DROPS trusted base entries. Allowlist deletions must land via their own reviewed commit instead of chaining into the bootstrap window. P2 -- ``html-svg-renderer.tsx``: ```; + it("keeps inline `; const clean = sanitizeSvgSource(svg).toLowerCase(); - expect(clean).not.toContain(" { diff --git a/studio/frontend/src/components/assistant-ui/html-svg-renderer.tsx b/studio/frontend/src/components/assistant-ui/html-svg-renderer.tsx index d257ab9756..526c4f2a1a 100644 --- a/studio/frontend/src/components/assistant-ui/html-svg-renderer.tsx +++ b/studio/frontend/src/components/assistant-ui/html-svg-renderer.tsx @@ -53,13 +53,17 @@ const HEURISTIC_UNSAFE_SVG_RE = // https://developer.mozilla.org/en-US/docs/Web/SVG/Guides/SVG_as_an_image const SVG_PURIFY_CONFIG = { USE_PROFILES: { svg: true, svgFilters: true }, - // ``style`` -- inline CSS would otherwise leak to the host page selectors. // ``image`` / ``use`` -- carry ``href``/``xlink:href`` and would let an // assistant fetch attacker-controlled URLs from the user's browser. // ``foreignObject`` -- can embed HTML inside the SVG and re-introduce XSS. + // ``script`` / ``link`` / ``meta`` / ``iframe`` / ``embed`` / ``object`` + // are unconditional XSS / network surfaces. ``