You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2026/08/13 00:49:40 UTC

(skywalking-horizon-ui) branch main updated: feat(security): content-security-policy, outbound-link policy, and CI security gates (#118)

This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new e7dbb30  feat(security): content-security-policy, outbound-link policy, and CI security gates (#118)
e7dbb30 is described below

commit e7dbb307e1abbe47f54970d7e793473c2460fcb1
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Aug 13 08:49:36 2026 +0800

    feat(security): content-security-policy, outbound-link policy, and CI security gates (#118)
---
 .github/workflows/ci.yaml                          |  50 +-
 .licenserc.yaml                                    |   4 -
 README.md                                          |   4 +-
 apps/bff/src/ai/http/chat.ts                       |  10 +-
 apps/bff/src/audit/logger.test.ts                  |  86 ++++
 apps/bff/src/audit/logger.ts                       |  28 +-
 apps/bff/src/config/schema.ts                      |  38 ++
 apps/bff/src/http/admin/template-sync.test.ts      |  97 ++++
 apps/bff/src/http/admin/template-sync.ts           |  56 ++-
 apps/bff/src/http/config/bundle.ts                 |   6 +-
 apps/bff/src/http/config/layer-template.test.ts    |  95 ++++
 apps/bff/src/http/config/layer-template.ts         |  19 +-
 apps/bff/src/http/config/settings.ts               |   5 +-
 apps/bff/src/http/query/menu.test.ts               |  42 ++
 apps/bff/src/http/query/menu.ts                    |  33 +-
 apps/bff/src/logic/infra-3d/bundled.ts             |  17 +-
 apps/bff/src/logic/infra-3d/validate.test.ts       |  67 +++
 apps/bff/src/logic/infra-3d/validate.ts            |  27 +-
 apps/bff/src/logic/templates/bundled-schema.ts     |  68 ++-
 .../src/logic/templates/bundled-validate-cli.ts    |   6 +-
 .../src/logic/templates/bundled-validate.test.ts   |  57 ++-
 apps/bff/src/logic/templates/bundled-validate.ts   | 102 +++-
 apps/bff/src/server.ts                             |  16 +-
 apps/bff/src/util/link-policy.test.ts              | 131 +++++
 apps/bff/src/util/link-policy.ts                   | 132 +++++
 apps/bff/src/util/security-headers.test.ts         | 118 +++++
 apps/bff/src/util/security-headers.ts              | 105 ++++
 apps/ui/eslint.config.mjs                          |  56 +++
 apps/ui/index.html                                 |   2 +-
 apps/ui/package.json                               |   6 -
 apps/ui/public/{favicon.ico => favicon.png}        | Bin
 .../{EVENTMESH.png => EVENTMESH.jpg}               | Bin
 apps/ui/src/assets/topology-icons/NATS.png         | Bin 626 -> 2742 bytes
 .../assets/topology-icons/{SEATA.png => SEATA.jpg} | Bin
 apps/ui/src/assets/topology-icons/ZOOKEEPER.png    | Bin 4847 -> 10113 bytes
 apps/ui/src/features/auth/LoginView.vue            |   1 +
 apps/ui/src/features/infra-3d/Infra3DView.vue      |   1 +
 apps/ui/src/shell/AppSidebar.vue                   |   1 +
 apps/ui/src/shell/AppTopbar.vue                    |   1 +
 dist-material/release-docs/LICENSE                 |  53 +-
 docs/access-control/audit-log.md                   |   2 +-
 docs/access-control/break-glass.md                 |   2 +-
 docs/changelog/1.0.0.md                            |   7 +
 docs/menu.yml                                      |   2 +
 docs/setup/security.md                             |  71 +++
 horizon.yaml                                       |  17 +
 package.json                                       |  10 +-
 packages/templates/package.json                    |  26 -
 packages/templates/src/index.ts                    |  22 -
 packages/templates/tsconfig.build.json             |  16 -
 packages/templates/tsconfig.json                   |   9 -
 pnpm-lock.yaml                                     | 475 +-----------------
 scripts/check-security-selftest.mjs                | 181 +++++++
 scripts/check-security.mjs                         | 534 +++++++++++++++++++++
 scripts/check-unused-deps.mjs                      | 115 +++++
 scripts/package.mjs                                |   2 +-
 scripts/release.sh                                 |  25 +-
 test/e2e/CLAUDE.md                                 |  19 +-
 test/e2e/cases/deployment/e2e.yaml                 |  13 +-
 test/e2e/playwright/playwright.config.ts           |   4 +
 test/e2e/playwright/specs/admin/pages.spec.ts      |  45 +-
 .../playwright/specs/deployment/banyandb.spec.ts   |  72 +--
 .../playwright/specs/deployment/mal-debug.spec.ts  |   3 +
 test/e2e/playwright/specs/es/trace-v1.spec.ts      |  13 +-
 test/e2e/playwright/specs/istio/mesh.spec.ts       |  19 +-
 test/e2e/playwright/specs/support/diagnostics.ts   |  26 +-
 test/e2e/playwright/specs/ui/dsl-debug.spec.ts     |  49 +-
 test/e2e/playwright/specs/ui/entities.spec.ts      |  29 +-
 test/e2e/playwright/specs/ui/layout.spec.ts        |  38 +-
 .../specs/ui/overview-metric-widget.spec.ts        |   4 +-
 test/e2e/playwright/specs/ui/overview.spec.ts      |  10 +-
 test/e2e/playwright/specs/ui/shell.spec.ts         |  15 +-
 .../playwright/specs/ui/template-fidelity.spec.ts  | 121 ++++-
 73 files changed, 2780 insertions(+), 756 deletions(-)

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 764c311..dd7f810 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -69,9 +69,26 @@ jobs:
       # shipping defect rather than operator error — and the loader only
       # JSON.parses them, which is how an orderBy naming a nonexistent column
       # and an unsupported aggregation both shipped.
-      - name: Lint, source budget, i18n, bundled templates
+      - name: Lint, source budget, i18n, security, bundled templates
         run: pnpm lint
 
+      # Advisories against what actually SHIPS. `--prod` matches the scope the
+      # binary LICENSE is generated from, so the two gates describe the same
+      # artifact. A finding here is always something an operator would run, so
+      # it blocks. Only high+ does: a gate that fails on things nobody can act
+      # on gets ignored.
+      - name: Audit shipped dependencies
+        run: pnpm audit --prod --audit-level=high
+
+      # Dev tooling is a different threat model, not a lesser one — it runs in
+      # CI with repository credentials and on contributors' machines, so a
+      # compromised build tool can reach the artifact without ever being IN it.
+      # Reported rather than enforced: an advisory in a linter's transitive
+      # tree with no patch available would otherwise block every unrelated PR.
+      - name: Audit build tooling (report only)
+        continue-on-error: true
+        run: pnpm audit --audit-level=high
+
       - name: Type-check
         run: pnpm -r run type-check
 
@@ -167,7 +184,36 @@ jobs:
           code=$(curl -s -o /dev/null -w '%{http_code}' "http://127.0.0.1:8099/layer/general/traces")
           [ "$code" = "200" ] || fail "SPA deep link returned ${code}"
           curl -s "http://127.0.0.1:8099/api/nope" | grep -q '"code":"not_found"' || fail "/api/* 404 is not the JSON envelope"
-          echo "packaged artifact boots and serves the UI"
+
+          # Security headers, asserted against the SHIPPED artifact — a unit
+          # test on the header map cannot catch a hook that never runs, a
+          # plugin registered ahead of it, or a route that writes its own head.
+          hdr() { curl -s -D - -o /dev/null "$1" | tr -d '\r' | grep -i "^$2:" | cut -d' ' -f2-; }
+          csp=$(hdr "http://127.0.0.1:8099/" "content-security-policy")
+          [ -n "$csp" ] || fail "no Content-Security-Policy on the SPA shell"
+          # Pull script-src out and judge it alone. Matching the whole policy
+          # would be both wrong ways round: style-src legitimately carries
+          # 'unsafe-inline', and a substring test on the joined string depends
+          # on token order. This is the directive that makes an injected
+          # handler or a stored javascript: URL inert.
+          scriptsrc=$(printf '%s' "$csp" | tr ';' '\n' | grep -i 'script-src' | head -1 || true)
+          [ -n "$scriptsrc" ] || fail "CSP has no script-src: ${csp}"
+          case "$scriptsrc" in *"'self'"*) ;; *) fail "script-src lacks 'self': ${scriptsrc}" ;; esac
+          case "$scriptsrc" in *unsafe-inline*|*unsafe-eval*|*unsafe-hashes*)
+            fail "script-src grants an unsafe keyword: ${scriptsrc}" ;; esac
+          for h in x-content-type-options x-frame-options referrer-policy; do
+            [ -n "$(hdr "http://127.0.0.1:8099/" "$h")" ] || fail "missing ${h} on the SPA shell"
+          done
+          # Every /api/ response, including a 404 and an error, is unstorable.
+          for p in /api/health /api/nope; do
+            cc=$(hdr "http://127.0.0.1:8099${p}" "cache-control")
+            [ "$cc" = "no-store" ] || fail "${p} Cache-Control is '${cc}', expected no-store"
+            [ -n "$(hdr "http://127.0.0.1:8099${p}" "content-security-policy")" ] || fail "no CSP on ${p}"
+          done
+          # ...while content-hashed assets stay cacheable.
+          cc=$(hdr "http://127.0.0.1:8099${asset}" "cache-control")
+          case "$cc" in *no-store*) fail "hashed asset ${asset} is no-store — static files must stay cacheable" ;; esac
+          echo "packaged artifact boots, serves the UI, and carries its security headers"
 
   required:
     # Status-check name pinned to "Required" so Apache branch protection
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 7b42b11..fa7c264 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -72,7 +72,6 @@ dependency:
     - apps/bff/package.json
     - packages/api-client/package.json
     - packages/design-tokens/package.json
-    - packages/templates/package.json
   excludes:
     - name: '@skywalking-horizon-ui/*' # Self workspace packages
       recursive: true
@@ -83,8 +82,5 @@ dependency:
   # against the package's own LICENSE/COPYING file (reproduced under
   # dist/licenses/) before being added.
   licenses:
-    - name: vue-grid-layout
-      version: 3.0.0-beta1
-      license: MIT # ships an MIT LICENSE file; package.json omits `license`
     - name: '@pmndrs/pointer-events'
       license: MIT # ships a verbatim MIT LICENSE file; package.json declares the non-SPDX "SEE LICENSE IN LICENSE"
diff --git a/README.md b/README.md
index b29cb6f..83dfc4f 100644
--- a/README.md
+++ b/README.md
@@ -83,7 +83,7 @@ Horizon UI is a pnpm-workspaces monorepo:
 
 - `apps/ui` — the Vue 3 + TypeScript (strict) single-page app, built with Vite. State via Pinia, data via `@tanstack/vue-query`, charts via Apache ECharts (wrapped — never instantiated directly in a view), topology and flame graphs via D3, 3D via Three.js + TresJS, code editing via Monaco.
 - `apps/bff` — a Fastify (Node) backend-for-frontend. It is the only tier that talks to OAP, shaping every reply for the SPA, owning timezone conversion, template sync, auth/RBAC, and the audit log.
-- `packages/api-client`, `packages/design-tokens`, `packages/templates` — the shared GraphQL client, the canonical design tokens, and the bundled dashboard JSON.
+- `packages/api-client`, `packages/design-tokens` — the shared typed client for the BFF, and the canonical design tokens. Bundled dashboard JSON lives with the BFF that serves it.
 
 The BFF speaks three OAP contracts, all owned upstream and treated as fixed:
 
@@ -95,7 +95,7 @@ The flow inside the BFF is one-directional — `http → logic → client → OA
 
 ## Getting started / Development
 
-Prerequisites: Node (see `package.json` `engines` — `>=22`) and pnpm via Corepack (the repo pins the version through `packageManager`).
+Prerequisites: Node (see `package.json` `engines` — `>=24`, the line CI and the container image both use) and pnpm via Corepack (the repo pins the version through `packageManager`).
 
 ```bash
 corepack enable
diff --git a/apps/bff/src/ai/http/chat.ts b/apps/bff/src/ai/http/chat.ts
index 517faaa..d05ae8f 100644
--- a/apps/bff/src/ai/http/chat.ts
+++ b/apps/bff/src/ai/http/chat.ts
@@ -49,6 +49,7 @@ import { runAiChat } from '../agent/agent.js';
 import { createFigureBuffer } from '../figure-buffer.js';
 import type { AiRequestContext } from '../context.js';
 import type { SseEvent } from '../types.js';
+import { SECURITY_HEADERS, API_CACHE_CONTROL } from '../../util/security-headers.js';
 
 export interface AiChatRouteDeps {
   config: ConfigSource;
@@ -123,12 +124,13 @@ export function registerAiRoutes(app: FastifyInstance, deps: AiChatRouteDeps): v
     raw.writeHead(200, {
       // Re-add what the bypassed onSend hook would set, plus the SSE headers.
       'Content-Type': 'text/event-stream; charset=utf-8',
-      'Cache-Control': 'no-cache, no-transform',
+      // `no-store` matches every other /api/ response (this route bypasses the
+      // hook that applies it); `no-transform` additionally stops a proxy
+      // rewriting the stream, which would break SSE framing.
+      'Cache-Control': `${API_CACHE_CONTROL}, no-transform`,
       Connection: 'keep-alive',
       'X-Accel-Buffering': 'no',
-      'X-Content-Type-Options': 'nosniff',
-      'X-Frame-Options': 'DENY',
-      'Referrer-Policy': 'no-referrer',
+      ...SECURITY_HEADERS,
       ...(setCookie ? { 'Set-Cookie': setCookie } : {}),
     });
 
diff --git a/apps/bff/src/audit/logger.test.ts b/apps/bff/src/audit/logger.test.ts
new file mode 100644
index 0000000..212fbe1
--- /dev/null
+++ b/apps/bff/src/audit/logger.test.ts
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { describe, it, expect } from 'vitest';
+import { readFileSync, mkdtempSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join } from 'node:path';
+import { AuditLogger } from './logger.js';
+
+const SID = 'SECRET-SESSION-ID-abcdef0123456789';
+
+async function write(events: Parameters<AuditLogger['record']>[0][]): Promise<string> {
+  const file = join(mkdtempSync(join(tmpdir(), 'audit-')), 'audit.jsonl');
+  const log = new AuditLogger(file, true);
+  await log.open();
+  for (const e of events) log.record(e);
+  await log.close();
+  return readFileSync(file, 'utf8');
+}
+
+const base = { actor: 'admin', action: 'auth.login', outcome: 'success' } as const;
+
+describe('the audit trail records no replayable session credential', () => {
+  // The session id IS the cookie. An audit file reaches a SIEM, a ticket and
+  // an incident channel — all wider audiences than the session store.
+  it('never writes the raw session id', async () => {
+    const text = await write([{ ...base, sessionId: SID }]);
+    expect(text).not.toContain(SID);
+    expect(JSON.parse(text.trim()).sessionId).not.toBe(SID);
+  });
+
+  // Without this the field would be worthless: following one operator's run
+  // of actions is the reason it is recorded at all.
+  it('gives the same session the same value throughout the process', async () => {
+    const lines = (await write([
+      { ...base, sessionId: SID },
+      { ...base, action: 'rule.addOrUpdate', sessionId: SID },
+    ]))
+      .trim()
+      .split('\n')
+      .map((l) => JSON.parse(l) as { sessionId: string });
+    expect(lines[0].sessionId).toBe(lines[1].sessionId);
+    expect(lines[0].sessionId).toMatch(/^[0-9a-f]{16}$/);
+  });
+
+  it('gives different sessions different values', async () => {
+    const lines = (await write([
+      { ...base, sessionId: SID },
+      { ...base, sessionId: `${SID}-other` },
+    ]))
+      .trim()
+      .split('\n')
+      .map((l) => JSON.parse(l) as { sessionId: string });
+    expect(lines[0].sessionId).not.toBe(lines[1].sessionId);
+  });
+
+  it('leaves an event without a session alone', async () => {
+    const line = JSON.parse((await write([{ ...base, actor: null }])).trim()) as Record<string, unknown>;
+    expect('sessionId' in line).toBe(false);
+  });
+
+  // `details` is caller-shaped and passes through untouched — the live-debug
+  // routes put an OAP debug-session id there, which is a different thing from
+  // the auth session and must not be mangled.
+  it('does not rewrite unrelated ids carried in details', async () => {
+    const line = JSON.parse(
+      (await write([{ ...base, sessionId: SID, details: { sessionId: 'oap-debug-42' } }])).trim(),
+    ) as { details: { sessionId: string }; sessionId: string };
+    expect(line.details.sessionId).toBe('oap-debug-42');
+    expect(line.sessionId).not.toBe(SID);
+  });
+});
diff --git a/apps/bff/src/audit/logger.ts b/apps/bff/src/audit/logger.ts
index 46d6d04..bd7773d 100644
--- a/apps/bff/src/audit/logger.ts
+++ b/apps/bff/src/audit/logger.ts
@@ -16,6 +16,7 @@
  */
 
 import { createWriteStream, type WriteStream } from 'node:fs';
+import { createHash, randomBytes } from 'node:crypto';
 import { mkdir } from 'node:fs/promises';
 import { dirname, resolve } from 'node:path';
 import { logger } from '../logger.js';
@@ -32,9 +33,30 @@ export interface AuditEvent {
   outcome: string;
   details?: Record<string, unknown>;
   fromIp?: string;
+  /** Written by callers as the raw session id; `record()` replaces it with a
+   *  salted one-way digest before anything is persisted. */
   sessionId?: string;
 }
 
+/**
+ * The session id is a bearer credential: it IS the cookie, so anything holding
+ * it can replay the session until it expires. An audit trail is read by more
+ * people than the session store is — it is shipped to a SIEM, tailed during an
+ * incident, attached to a ticket — so it carries a one-way correlation value
+ * instead, enough to tie a run of actions to one session and useless to a
+ * reader who obtains the file.
+ *
+ * The salt is per-process and random by design: sessions live in memory and do
+ * not survive a restart either, so correlation is meaningful exactly as long
+ * as it needs to be, and a digest from an older file cannot be matched against
+ * a live session even with the same id.
+ */
+const AUDIT_SALT = randomBytes(32);
+
+function sessionCorrelationId(sid: string): string {
+  return createHash('sha256').update(AUDIT_SALT).update(sid).digest('hex').slice(0, 16);
+}
+
 export class AuditLogger {
   private stream: WriteStream | null = null;
   private readonly absPath: string;
@@ -60,7 +82,11 @@ export class AuditLogger {
 
   record(evt: Omit<AuditEvent, 'ts'>): void {
     if (!this.enabled) return;
-    const line: AuditEvent = { ts: new Date().toISOString(), ...evt };
+    const line: AuditEvent = {
+      ts: new Date().toISOString(),
+      ...evt,
+      ...(evt.sessionId ? { sessionId: sessionCorrelationId(evt.sessionId) } : {}),
+    };
     if (!this.stream) {
       logger.warn({ evt: line }, 'audit logged before open()');
       return;
diff --git a/apps/bff/src/config/schema.ts b/apps/bff/src/config/schema.ts
index b0a2064..85b87d1 100644
--- a/apps/bff/src/config/schema.ts
+++ b/apps/bff/src/config/schema.ts
@@ -549,11 +549,49 @@ const templatesSchema = z
   .strict()
   .default({ mode: templatesModeDefault });
 
+/** Hosts a template's outbound link may point at. Horizon is a closed
+ *  console: the only operator-supplied link is a layer template's
+ *  `documentLink` ("docs ↗" in the layer header), and it may only leave the
+ *  origin for a host listed here.
+ *
+ *  The default carries the project's own documentation domain because all 44
+ *  bundled layer templates link there — it is a DEFAULT, not a built-in
+ *  exemption, so an operator who wants a fully closed console sets this to
+ *  `[]` and every outbound link stops rendering. Add your own wiki here.
+ *
+ *  A site-relative link (`/runbook/…`) never needs listing; it does not leave
+ *  the origin. Non-http(s) schemes are refused outright, wherever they come
+ *  from — that check is not configurable. */
+const TRUSTED_LINK_DOMAINS_DEFAULT = ['skywalking.apache.org'];
+
+const securitySchema = z
+  .object({
+    // Hostnames, not URLs or patterns. A value with a scheme, a path, a port
+    // or a wildcard would never match — `new URL(...).hostname` is what it is
+    // compared against — so it is refused at boot rather than silently
+    // matching nothing, which would read as "the allow-list is not working".
+    trustedLinkDomains: z
+      .array(
+        z
+          .string()
+          .trim()
+          .toLowerCase()
+          .refine((v) => /^[a-z0-9.-]+$/.test(v) && !v.startsWith('.') && !v.endsWith('.'), {
+            message:
+              'must be a bare hostname such as "wiki.internal" — no scheme, port, path or wildcard (a host matches itself and its subdomains)',
+          }),
+      )
+      .default(TRUSTED_LINK_DOMAINS_DEFAULT),
+  })
+  .strict()
+  .default({ trustedLinkDomains: TRUSTED_LINK_DOMAINS_DEFAULT });
+
 export const configSchema = z
   .object({
     server: serverSchema.default({}),
     layers: layersSchema,
     templates: templatesSchema,
+    security: securitySchema,
     oap: oapSchema.default({}),
     auth: authSchema,
     rbac: rbacSchema,
diff --git a/apps/bff/src/http/admin/template-sync.test.ts b/apps/bff/src/http/admin/template-sync.test.ts
index 8fd7cc5..1ea7c64 100644
--- a/apps/bff/src/http/admin/template-sync.test.ts
+++ b/apps/bff/src/http/admin/template-sync.test.ts
@@ -869,3 +869,100 @@ describe('push-bar calibration', () => {
     expect(found).toEqual([]);
   });
 });
+
+// The alarm-page setup, the active theme and the global time default were the
+// only configuration published with no shape check at all: a malformed payload
+// was stored on OAP verbatim and then served to every signed-in user, surfacing
+// later as a page that would not render. OAP keeps these as opaque strings and
+// tells the kinds apart only by row name, so this boundary is the only place
+// the shape can be checked.
+describe('POST /api/admin/templates/save — singleton settings reaching OAP', () => {
+  const cases: { name: string; good: object; bad: object; badPath: string }[] = [
+    {
+      name: 'horizon.alert.page-setup',
+      good: { pinnedLayers: ['GENERAL'], defaultWindowMs: 1_200_000, overviewAlarmsLimit: 200 },
+      bad: { pinnedLayers: 'GENERAL', defaultWindowMs: 1_200_000, overviewAlarmsLimit: 200 },
+      badPath: 'pinnedLayers:',
+    },
+    {
+      name: 'horizon.theme.active',
+      good: { themeId: 'horizon' },
+      bad: { themeId: 'horizon', extra: true },
+      badPath: '(root):',
+    },
+    {
+      name: 'horizon.time-defaults.global',
+      good: { defaultWindowMinutes: 60 },
+      bad: { defaultWindowMinutes: -1 },
+      badPath: 'defaultWindowMinutes:',
+    },
+  ];
+
+  for (const { name, good, bad, badPath } of cases) {
+    it(`refuses malformed ${name} and writes nothing`, async () => {
+      const store = makeStore();
+      const { app, cookie: c } = await buildApp(store.fetchImpl);
+
+      const res = await post(app, '/api/admin/templates/save', c, { name, content: bad });
+
+      expect(res.statusCode).toBe(400);
+      const body = res.json() as { code: string; issues: string[] };
+      expect(body.code).toBe('invalid_content');
+      expect(body.issues.some((i) => i.startsWith(badPath))).toBe(true);
+      expect(store.writes).toEqual([]);
+      await app.close();
+    });
+
+    it(`still publishes a well-formed ${name}`, async () => {
+      const store = makeStore();
+      const { app, cookie: c } = await buildApp(store.fetchImpl);
+
+      const res = await post(app, '/api/admin/templates/save', c, { name, content: good });
+
+      expect(res.statusCode).toBe(200);
+      expect(store.writes.length).toBe(1);
+      await app.close();
+    });
+  }
+});
+
+// The publish boundary is where an operator gets a REASON. Without it a link
+// to an untrusted host saves cleanly and then silently fails to render, which
+// reads as a bug rather than as policy.
+describe('POST /api/admin/templates/save — documentLink link policy', () => {
+  const withLink = (documentLink: string): Json => ({ ...validLayer('GENERAL'), documentLink });
+
+  it.each([
+    ['a javascript: scheme', 'javascript:alert(1)', 'javascript:'],
+    ['an untrusted host', 'https://evil.example/x', 'evil.example'],
+  ])('refuses %s and writes nothing', async (_label, link, expected) => {
+    const store = makeStore();
+    const { app, cookie: c } = await buildApp(store.fetchImpl);
+
+    const res = await post(app, '/api/admin/templates/save', c, {
+      name: 'horizon.layer.GENERAL',
+      content: withLink(link),
+    });
+
+    expect(res.statusCode).toBe(400);
+    const body = res.json() as { code: string; issues: string[] };
+    expect(body.code).toBe('invalid_content');
+    expect(body.issues.some((i) => i.startsWith('documentLink:') && i.includes(expected))).toBe(true);
+    expect(store.writes).toEqual([]);
+    await app.close();
+  });
+
+  it('publishes a link on the default trusted host', async () => {
+    const store = makeStore();
+    const { app, cookie: c } = await buildApp(store.fetchImpl);
+
+    const res = await post(app, '/api/admin/templates/save', c, {
+      name: 'horizon.layer.GENERAL',
+      content: withLink('https://skywalking.apache.org/docs/'),
+    });
+
+    expect(res.statusCode).toBe(200);
+    expect(store.writes.length).toBe(1);
+    await app.close();
+  });
+});
diff --git a/apps/bff/src/http/admin/template-sync.ts b/apps/bff/src/http/admin/template-sync.ts
index 2d03d3d..357562c 100644
--- a/apps/bff/src/http/admin/template-sync.ts
+++ b/apps/bff/src/http/admin/template-sync.ts
@@ -62,7 +62,7 @@
  */
 
 import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
-import type { ZodError } from 'zod';
+import type { ZodError, ZodType } from 'zod';
 import type { UITemplateClient } from '@skywalking-horizon-ui/api-client';
 import type { ConfigSource } from '../../config/loader.js';
 import type { SessionStore } from '../../user/sessions.js';
@@ -89,10 +89,14 @@ import {
 } from '../../logic/templates/names.js';
 import { getLayerOverlay, getOverviewOverlay, isLocale } from '../../i18n/index.js';
 import { validateInfra3dConfig } from '../../logic/infra-3d/validate.js';
+import { linkDomainIssue } from '../../util/link-policy.js';
 import {
+  alertTemplateSchema,
   layerCrossRefIssues,
   layerTemplatePushSchema,
   overviewTemplatePushSchema,
+  themeTemplateSchema,
+  timeDefaultsTemplateSchema,
 } from '../../logic/templates/bundled-schema.js';
 import { templateIdentityIssue } from '../../logic/templates/identity.js';
 import { logger } from '../../logger.js';
@@ -366,7 +370,7 @@ export function registerTemplateSyncAdminRoutes(
           message: `no bundled template for ${name} — nothing to push`,
         });
       }
-      const bundledIssues = bundledPushIssues(row);
+      const bundledIssues = bundledPushIssues(row, deps.config.current.security.trustedLinkDomains);
       if (bundledIssues) {
         return reply.code(400).send({ code: 'invalid_content', issues: bundledIssues });
       }
@@ -427,7 +431,7 @@ export function registerTemplateSyncAdminRoutes(
     for (const row of targets) {
       // One unpublishable template doesn't sink the batch — it is reported like
       // any other per-row failure and the rest of the set still syncs.
-      const bundledIssues = bundledPushIssues(row);
+      const bundledIssues = bundledPushIssues(row, deps.config.current.security.trustedLinkDomains);
       if (bundledIssues) {
         logger.warn({ name: row.name, issues: bundledIssues }, 'sync-all skipped invalid bundled content');
         failed.push({ name: row.name, error: `invalid content — ${bundledIssues.join('; ')}` });
@@ -486,7 +490,12 @@ export function registerTemplateSyncAdminRoutes(
     // Identity + per-kind content validation. The envelope machinery is
     // content-opaque, so this is the only place a stored row is held to the
     // shape (and the name) its readers depend on.
-    const issues = publishIssues(parsed.kind as TemplateKind, parsed.key, content);
+    const issues = publishIssues(
+      parsed.kind as TemplateKind,
+      parsed.key,
+      content,
+      deps.config.current.security.trustedLinkDomains,
+    );
     if (issues) {
       return reply.code(400).send({ code: 'invalid_content', issues });
     }
@@ -644,7 +653,12 @@ export function registerTemplateSyncAdminRoutes(
  *      {@link overviewTemplatePushSchema}, or the 3D-map validator. Each rejects
  *      MALFORMED content, never merely incomplete content.
  */
-function publishIssues(kind: TemplateKind, key: string, content: unknown): string[] | null {
+function publishIssues(
+  kind: TemplateKind,
+  key: string,
+  content: unknown,
+  trustedLinkDomains: readonly string[],
+): string[] | null {
   const identity = templateIdentityIssue(kind, key, content);
   if (identity) return [`${identity.path}: ${identity.message}`];
   if (kind === 'layer') {
@@ -653,6 +667,14 @@ function publishIssues(kind: TemplateKind, key: string, content: unknown): strin
     const issues = layerCrossRefIssues(v.data, { complete: false }).map(
       (i) => `${i.path}: ${i.message}`,
     );
+    // The domain half of the link policy needs config, so it cannot live in
+    // the schema. Applying it HERE too means a publish is refused with the
+    // reason instead of succeeding and then vanishing on the read path.
+    const link = v.data.documentLink;
+    if (link) {
+      const linkIssue = linkDomainIssue(link, trustedLinkDomains);
+      if (linkIssue) issues.push(`documentLink: ${linkIssue}`);
+    }
     return issues.length > 0 ? issues : null;
   }
   if (kind === 'overview') {
@@ -663,9 +685,26 @@ function publishIssues(kind: TemplateKind, key: string, content: unknown): strin
     const v = validateInfra3dConfig(content);
     return v.ok ? null : v.issues;
   }
+  const singleton = SINGLETON_SCHEMAS[kind];
+  if (singleton) {
+    const v = singleton.safeParse(content);
+    return v.success ? null : zodIssues(v.error);
+  }
   return null;
 }
 
+/** Every kind not handled above. Typed as a TOTAL record minus the ones with
+ *  their own branch, so adding a `TemplateKind` fails to compile until its
+ *  validator is supplied — an unvalidated kind means storing arbitrary JSON
+ *  that `GET /api/configs/settings` then serves to every signed-in user, and
+ *  that must not be reachable by simply forgetting. */
+const SINGLETON_SCHEMAS: Record<Exclude<TemplateKind, 'layer' | 'overview' | 'infra-3d'>, ZodType> =
+  {
+    alert: alertTemplateSchema,
+    theme: themeTemplateSchema,
+    'time-defaults': timeDefaultsTemplateSchema,
+  };
+
 function zodIssues(err: ZodError): string[] {
   return err.issues.map((i) => `${i.path.join('.') || '(root)'}: ${i.message}`);
 }
@@ -674,10 +713,13 @@ function zodIssues(err: ZodError): string[] {
  *  the shipped bundle is validated in CI, but the container's
  *  `bundled_templates/` directory is documented as replaceable, so what a push
  *  actually reads off disk still has to hold up. */
-function bundledPushIssues(row: SyncStatus['rows'][number]): string[] | null {
+function bundledPushIssues(
+  row: SyncStatus['rows'][number],
+  trustedLinkDomains: readonly string[],
+): string[] | null {
   if (!row.bundled) return null;
   const env = parseEnvelope(row.bundled.configuration);
-  return env ? publishIssues(row.kind, row.key, env.content) : null;
+  return env ? publishIssues(row.kind, row.key, env.content, trustedLinkDomains) : null;
 }
 
 async function loadStatus(deps: TemplateSyncAdminDeps): Promise<SyncStatus> {
diff --git a/apps/bff/src/http/config/bundle.ts b/apps/bff/src/http/config/bundle.ts
index e4cfb1a..a9b1a59 100644
--- a/apps/bff/src/http/config/bundle.ts
+++ b/apps/bff/src/http/config/bundle.ts
@@ -159,8 +159,12 @@ export function registerConfigBundleRoute(app: FastifyInstance, deps: ConfigBund
       if (typeof inm === 'string' && inm === body.etag) {
         return reply.code(304).send();
       }
+      // The 304 above still fires under the central `no-store` rule: the SPA
+      // keeps this payload in localStorage and sets `If-None-Match` itself,
+      // so revalidation never depended on the browser's HTTP cache. Nothing
+      // to trade off here — `no-store` only stops the browser writing its own
+      // copy to disk.
       reply.header('ETag', body.etag);
-      reply.header('Cache-Control', 'private, max-age=0, must-revalidate');
       return reply.send(body);
     },
   );
diff --git a/apps/bff/src/http/config/layer-template.test.ts b/apps/bff/src/http/config/layer-template.test.ts
new file mode 100644
index 0000000..262f231
--- /dev/null
+++ b/apps/bff/src/http/config/layer-template.test.ts
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { describe, it, expect, vi, afterEach } from 'vitest';
+import Fastify, { type FastifyInstance } from 'fastify';
+import cookie from '@fastify/cookie';
+import { SessionStore } from '../../user/sessions.js';
+import { makeRouteAuthHook } from '../../rbac/route-policy.js';
+import { configSchema } from '../../config/schema.js';
+import type { ConfigSource } from '../../config/loader.js';
+import { registerLayerTemplateRoutes } from './layer-template.js';
+import * as loader from '../../logic/layers/loader.js';
+
+function fakeConfig(trustedLinkDomains?: string[]): ConfigSource {
+  const parsed = configSchema.parse(
+    trustedLinkDomains ? { security: { trustedLinkDomains } } : {},
+  );
+  return { current: parsed, path: 'test' } as unknown as ConfigSource;
+}
+
+async function build(trustedLinkDomains?: string[]): Promise<{ app: FastifyInstance; sid: string }> {
+  const config = fakeConfig(trustedLinkDomains);
+  const sessions = new SessionStore({ ttlMinutes: 60 });
+  const app = Fastify();
+  await app.register(cookie);
+  app.addHook('onRoute', makeRouteAuthHook({ config, sessions }));
+  registerLayerTemplateRoutes(app, { config, sessions });
+  await app.ready();
+  return { app, sid: sessions.create('op', ['admin']).sid };
+}
+
+/** The one field under test; the rest of a layer template is irrelevant here. */
+function stubTemplates(documentLink?: string): void {
+  vi.spyOn(loader, 'allLayerTemplates').mockReturnValue([
+    { key: 'GENERAL', alias: 'General', components: {}, ...(documentLink ? { documentLink } : {}) },
+  ] as unknown as ReturnType<typeof loader.allLayerTemplates>);
+}
+
+async function linkFor(documentLink: string, trusted?: string[]): Promise<string | undefined> {
+  stubTemplates(documentLink);
+  const { app, sid } = await build(trusted);
+  const res = await app.inject({
+    method: 'GET',
+    url: '/api/admin/layer-templates',
+    headers: { cookie: `horizon_sid=${sid}` },
+  });
+  await app.close();
+  expect(res.statusCode).toBe(200);
+  const body = res.json() as { templates: Array<{ documentLink?: string }> };
+  return body.templates[0]?.documentLink;
+}
+
+afterEach(() => vi.restoreAllMocks());
+
+// The layer page falls back to THIS list to preview a layer OAP does not list
+// yet, and renders its documentLink in the same anchor the menu does. Serving
+// it unchecked would leave a render path the menu's own check never sees —
+// which is exactly what this route did before.
+describe('GET /api/admin/layer-templates — the preview list applies the link policy', () => {
+  it('serves a link on a trusted host', async () => {
+    expect(await linkFor('https://skywalking.apache.org/docs/')).toBe(
+      'https://skywalking.apache.org/docs/',
+    );
+  });
+
+  it.each([
+    ['a javascript: scheme', 'javascript:alert(1)'],
+    ['an untrusted host', 'https://evil.example/x'],
+    ['a backslash escape that leaves the origin', '/\\evil.example/x'],
+  ])('withholds %s', async (_label, link) => {
+    expect(await linkFor(link)).toBeUndefined();
+  });
+
+  it('withholds every outbound link when the allow-list is empty', async () => {
+    expect(await linkFor('https://skywalking.apache.org/docs/', [])).toBeUndefined();
+  });
+
+  it('keeps a same-origin path whatever the allow-list says', async () => {
+    expect(await linkFor('/runbook/general', [])).toBe('/runbook/general');
+  });
+});
diff --git a/apps/bff/src/http/config/layer-template.ts b/apps/bff/src/http/config/layer-template.ts
index 98ee6da..96e8664 100644
--- a/apps/bff/src/http/config/layer-template.ts
+++ b/apps/bff/src/http/config/layer-template.ts
@@ -25,6 +25,8 @@ import type { ConfigSource } from '../../config/loader.js';
 import type { SessionStore } from '../../user/sessions.js';
 import { requireAuth } from '../../user/middleware.js';
 import { allLayerTemplates } from '../../logic/layers/loader.js';
+import { documentLinkIssue } from '../../util/link-policy.js';
+import { logger } from '../../logger.js';
 
 export interface LayerTemplateConfigDeps {
   config: ConfigSource;
@@ -40,7 +42,22 @@ export function registerLayerTemplateRoutes(
   // route to drive an editor; translations are managed through the
   // dedicated translation editor and shipped separately as overlays.
   app.get('/api/admin/layer-templates', { preHandler: auth }, async (_req, reply) => {
-    return reply.send({ templates: allLayerTemplates() });
+    // The layer page falls back to this list to preview a layer OAP does not
+    // list yet, and renders its `documentLink` in the same anchor the menu
+    // does — so the same policy has to run here. Serving it unchecked would
+    // leave a render path the menu's check never sees.
+    const trusted = deps.config.current.security.trustedLinkDomains;
+    const templates = allLayerTemplates().map((tpl) => {
+      if (!tpl.documentLink) return tpl;
+      const issue = documentLinkIssue(tpl.documentLink, trusted);
+      if (!issue) return tpl;
+      logger.warn(
+        { layer: tpl.key, issue },
+        'layer documentLink rejected by link policy — withheld from the preview list',
+      );
+      return { ...tpl, documentLink: undefined };
+    });
+    return reply.send({ templates });
   });
 
   // No write route here: operator updates go through `/api/admin/templates/save`
diff --git a/apps/bff/src/http/config/settings.ts b/apps/bff/src/http/config/settings.ts
index 104e4d1..393628a 100644
--- a/apps/bff/src/http/config/settings.ts
+++ b/apps/bff/src/http/config/settings.ts
@@ -82,9 +82,8 @@ export function registerSettingsRoute(app: FastifyInstance, deps: SettingsRouteD
         timeDefaults: effectiveContent(sync, formatName('time-defaults', TIME_DEFAULTS_KEY)),
         alert: effectiveContent(sync, formatName('alert', ALERT_PAGE_SETUP_KEY)),
       };
-      // No browser caching: an operator's publish has to land on the next
-      // read. The 30s sync cache already absorbs the OAP hit.
-      reply.header('Cache-Control', 'private, max-age=0, must-revalidate');
+      // Caching is governed centrally for every /api/ path (no-store), so
+      // an operator's publish always lands on the next read.
       return reply.send(body);
     },
   );
diff --git a/apps/bff/src/http/query/menu.test.ts b/apps/bff/src/http/query/menu.test.ts
index d471368..3f3497b 100644
--- a/apps/bff/src/http/query/menu.test.ts
+++ b/apps/bff/src/http/query/menu.test.ts
@@ -312,3 +312,45 @@ describe('menu — a duplicated layer template is not navigable', () => {
     expect(String(warns[0]?.[1])).toContain('Dashboard setup → Layer dashboards');
   });
 });
+
+/** A layer envelope carrying an operator-supplied documentation link. */
+const layerCfgWithLink = (key: string, documentLink: string): string =>
+  serializeEnvelope(
+    buildEnvelope('layer', key, {
+      key,
+      alias: key,
+      slots: { services: 'Services' },
+      components: { service: true },
+      documentLink,
+    }),
+  );
+
+// The publish boundary refuses a bad link, but the store it is read back from
+// is OAP — which keeps templates as opaque text and can be written without
+// going through Horizon at all. So the read path checks too, and this is the
+// wiring that proves it, rather than the pure policy function.
+describe('menu — a documentLink that fails the link policy is not served', () => {
+  // The 30s sync cache is process-wide, so a stale entry would let one case
+  // read the previous case's template.
+  beforeEach(() => invalidateSyncCache());
+  afterEach(() => invalidateSyncCache());
+
+  it('serves a link on a trusted host', async () => {
+    const layer = await menuLayer(
+      [row('1', layerCfgWithLink('GENERAL', 'https://skywalking.apache.org/docs/'))],
+      'general',
+    );
+    expect(layer?.documentLink).toBe('https://skywalking.apache.org/docs/');
+  });
+
+  it.each([
+    ['a javascript: scheme', 'javascript:alert(document.domain)'],
+    ['an untrusted host', 'https://evil.example/x'],
+    ['a backslash escape that leaves the origin', '/\\evil.example/x'],
+  ])('withholds %s', async (_label, documentLink) => {
+    const layer = await menuLayer([row('1', layerCfgWithLink('GENERAL', documentLink))], 'general');
+    // The layer still renders — only its link is dropped.
+    expect(layer).toBeDefined();
+    expect(layer?.documentLink).toBeUndefined();
+  });
+});
diff --git a/apps/bff/src/http/query/menu.ts b/apps/bff/src/http/query/menu.ts
index eda7031..085a02c 100644
--- a/apps/bff/src/http/query/menu.ts
+++ b/apps/bff/src/http/query/menu.ts
@@ -38,6 +38,7 @@ import type { ServiceLayerCatalog } from '../../logic/services/service-layer-cat
 import { logger } from '../../logger.js';
 import type { Locale } from '../../i18n/index.js';
 import { localizeContent, localeFromRequest } from '../../i18n/index.js';
+import { linkSchemeIssue, linkDomainIssue } from '../../util/link-policy.js';
 import { oapOverlayContentFromRows } from '../../logic/templates/overlay.js';
 
 /**
@@ -353,6 +354,34 @@ function deriveLayer(
   };
 }
 
+/**
+ * Re-check every layer's `documentLink` on the way out, and drop the ones that
+ * fail. The push boundary already refuses a bad scheme, but this is the READ
+ * side of a store Horizon does not own: the templates live on OAP, which keeps
+ * them as opaque strings and can be written without going through Horizon at
+ * all. Validating only where we write would leave the render path trusting a
+ * value nobody checked.
+ *
+ * A rejected link is dropped rather than rendered, and logged with its reason
+ * — silently serving it is the failure mode that matters.
+ */
+function applyLinkPolicy(layers: LayerDef[], trustedDomains: readonly string[]): LayerDef[] {
+  return layers.map((layer) => {
+    const link = layer.documentLink;
+    if (!link) return layer;
+    const issue = linkSchemeIssue(link) ?? linkDomainIssue(link, trustedDomains);
+    if (!issue) return layer;
+    // The reason names the host or the scheme; the full URL is NOT logged —
+    // a rejected link's query string can carry a token, and the audit/log
+    // trail is read by more people than the template store is.
+    logger.warn(
+      { layer: layer.key, issue },
+      'layer documentLink rejected by link policy — not rendered',
+    );
+    return { ...layer, documentLink: undefined };
+  });
+}
+
 export function registerMenuRoute(app: FastifyInstance, deps: MenuRouteDeps): void {
   const auth = requireAuth(deps);
   app.get('/api/menu', { preHandler: auth }, async (req: FastifyRequest, reply: FastifyReply) => {
@@ -486,7 +515,7 @@ export function registerMenuRoute(app: FastifyInstance, deps: MenuRouteDeps): vo
         });
 
       const body: MenuResponse = {
-        layers,
+        layers: applyLinkPolicy(layers, cfg.security.trustedLinkDomains),
         generatedAt: Date.now(),
         oap: { reachable: true, queryUrl },
       };
@@ -509,7 +538,7 @@ export function registerMenuRoute(app: FastifyInstance, deps: MenuRouteDeps): vo
         layers.push(deriveLayer(key, false, null, -1, null, locale, emptyRows, null));
       }
       const body: MenuResponse = {
-        layers,
+        layers: applyLinkPolicy(layers, cfg.security.trustedLinkDomains),
         generatedAt: Date.now(),
         oap: {
           reachable: false,
diff --git a/apps/bff/src/logic/infra-3d/bundled.ts b/apps/bff/src/logic/infra-3d/bundled.ts
index 801ed42..f6da287 100644
--- a/apps/bff/src/logic/infra-3d/bundled.ts
+++ b/apps/bff/src/logic/infra-3d/bundled.ts
@@ -32,6 +32,7 @@ import { existsSync, readFileSync } from 'node:fs';
 import { dirname, resolve } from 'node:path';
 import { fileURLToPath } from 'node:url';
 import type { Infra3dConfig } from './types.js';
+import { stripCommentKeys } from './validate.js';
 
 const HERE = dirname(fileURLToPath(import.meta.url));
 
@@ -65,19 +66,3 @@ function locateBundle(): string {
   }
   throw new Error(`bundled infra-3d config not found in: ${candidates.join(', ')}`);
 }
-
-/** Recursively drop `$comment` / `$note` keys. The bundled JSON keeps
- *  them for readability; the loaded shape stays clean so downstream code
- *  doesn't have to special-case them. */
-function stripCommentKeys(value: unknown): unknown {
-  if (Array.isArray(value)) return value.map(stripCommentKeys);
-  if (value && typeof value === 'object') {
-    const out: Record<string, unknown> = {};
-    for (const [k, v] of Object.entries(value as Record<string, unknown>)) {
-      if (k === '$comment' || k === '$note') continue;
-      out[k] = stripCommentKeys(v);
-    }
-    return out;
-  }
-  return value;
-}
diff --git a/apps/bff/src/logic/infra-3d/validate.test.ts b/apps/bff/src/logic/infra-3d/validate.test.ts
new file mode 100644
index 0000000..6ff4702
--- /dev/null
+++ b/apps/bff/src/logic/infra-3d/validate.test.ts
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { describe, it, expect } from 'vitest';
+import { readFileSync } from 'node:fs';
+import { dirname, join } from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { validateInfra3dConfig, stripCommentKeys } from './validate.js';
+
+const HERE = dirname(fileURLToPath(import.meta.url));
+const BUNDLED = join(HERE, '../../bundled_templates/infra-3d/config.json');
+
+describe('the shipped 3D-map config passes the boundary that publishes it', () => {
+  // The regression this pins: the file carries `$comment` / `$note` authoring
+  // notes, `.strict()` counted them as unknown fields, and the same validator
+  // guards `push-bundled` and `sync-all` — so "reset to bundled" 400'd and a
+  // sync silently skipped the row. The map could never be restored to what
+  // Horizon ships.
+  it('validates with its authoring notes in place', () => {
+    const raw: unknown = JSON.parse(readFileSync(BUNDLED, 'utf8'));
+    expect((raw as Record<string, unknown>)['$comment']).toBeTypeOf('string');
+
+    const result = validateInfra3dConfig(raw);
+    expect(result.ok ? [] : result.issues).toEqual([]);
+  });
+
+  it('still refuses an unknown field that is not an authoring note', () => {
+    const raw = JSON.parse(readFileSync(BUNDLED, 'utf8')) as Record<string, unknown>;
+    raw.notAKnownField = 1;
+
+    const result = validateInfra3dConfig(raw);
+    expect(result.ok).toBe(false);
+  });
+
+  // Exact names, not a `$` prefix: a typo has to surface rather than be
+  // swallowed by a wildcard.
+  it('does not silently accept a mistyped note key', () => {
+    const raw = JSON.parse(readFileSync(BUNDLED, 'utf8')) as Record<string, unknown>;
+    raw.$note2 = 'typo';
+
+    expect(validateInfra3dConfig(raw).ok).toBe(false);
+  });
+
+  it('strips notes at every depth, leaving everything else untouched', () => {
+    const stripped = stripCommentKeys({
+      $comment: 'gone',
+      keep: 1,
+      nested: { $note: 'gone', deep: [{ $comment: 'gone', value: 'kept' }] },
+    });
+
+    expect(stripped).toEqual({ keep: 1, nested: { deep: [{ value: 'kept' }] } });
+  });
+});
diff --git a/apps/bff/src/logic/infra-3d/validate.ts b/apps/bff/src/logic/infra-3d/validate.ts
index e6a61d2..3aaef64 100644
--- a/apps/bff/src/logic/infra-3d/validate.ts
+++ b/apps/bff/src/logic/infra-3d/validate.ts
@@ -214,8 +214,33 @@ export type ValidationResult =
   | { ok: true; value: Infra3dConfig }
   | { ok: false; issues: string[] };
 
+/**
+ * Drop the `$comment` / `$note` authoring keys. The bundled config uses them
+ * to record why four layers deliberately ship without a traffic MQE, and the
+ * notes are worth keeping in the file — but `.strict()` counts them as unknown
+ * fields, so without this the shipped config fails its own validator and both
+ * `push-bundled` and `sync-all` refuse it.
+ *
+ * Matched by exact name rather than a `$` prefix on purpose: a mistyped
+ * `$note2` should still be reported, not silently swallowed. This is the one
+ * definition — `loadBundledInfra3dConfig` uses it too, so the loaded shape and
+ * the validated shape cannot drift.
+ */
+export function stripCommentKeys(value: unknown): unknown {
+  if (Array.isArray(value)) return value.map(stripCommentKeys);
+  if (value && typeof value === 'object') {
+    const out: Record<string, unknown> = {};
+    for (const [k, v] of Object.entries(value as Record<string, unknown>)) {
+      if (k === '$comment' || k === '$note') continue;
+      out[k] = stripCommentKeys(v);
+    }
+    return out;
+  }
+  return value;
+}
+
 export function validateInfra3dConfig(input: unknown): ValidationResult {
-  const parsed = configSchema.safeParse(input);
+  const parsed = configSchema.safeParse(stripCommentKeys(input));
   if (parsed.success) return { ok: true, value: parsed.data as Infra3dConfig };
   const issues = parsed.error.issues.map(
     (i) => `${i.path.join('.') || '<root>'}: ${i.message}`,
diff --git a/apps/bff/src/logic/templates/bundled-schema.ts b/apps/bff/src/logic/templates/bundled-schema.ts
index 3b10aec..3451e85 100644
--- a/apps/bff/src/logic/templates/bundled-schema.ts
+++ b/apps/bff/src/logic/templates/bundled-schema.ts
@@ -46,6 +46,7 @@
 
 import { z } from 'zod';
 import { widgetSchema, scopeSchema } from '../dashboard/schema.js';
+import { linkSchemeIssue } from '../../util/link-policy.js';
 
 /** Cross-side rollup of per-service values into one layer KPI. Mirrors
  *  `AggregationKind` — the landing route rejects anything else. */
@@ -337,7 +338,14 @@ function buildLayerSchemas(complete: boolean) {
       group: text.optional(),
       visibility: z.enum(['public', 'operate']).optional(),
       color: text.optional(),
-      documentLink: text.optional(),
+      // Rendered straight into the layer header's `<a href>`, so the scheme
+      // is checked HERE rather than at the render site — the store this is
+      // read back from (OAP) validates nothing and can be written without
+      // going through Horizon. The domain allow-list is applied separately,
+      // where the operator's config is in hand.
+      documentLink: text
+        .refine((v) => linkSchemeIssue(v) === null, (v) => ({ message: linkSchemeIssue(v) ?? 'invalid link' }))
+        .optional(),
       aliases: aliasesSchema.optional(),
       slots: aliasesSchema.optional(),
       components: componentsSchema,
@@ -719,3 +727,61 @@ export const overviewTemplateSchema = buildOverviewSchemas(true);
  * it is a product change, and the tests will say so.
  */
 export const overviewTemplatePushSchema = buildOverviewSchemas(false);
+
+/**
+ * The three singleton settings templates. Unlike dashboards, each is written
+ * whole by exactly one admin page — the alarms page setup, and the two halves
+ * of Global Defaults — so completeness IS the contract here and a partial
+ * object is a malformed one, not work in progress.
+ *
+ * `.strict()` is the load-bearing part: without it these rows are an
+ * unvalidated JSON store that every signed-in user reads back.
+ */
+/** These bounds are not new: the alarms config route enforced them until the
+ *  config moved to OAP, and they were lost in that move. The admin page still
+ *  applies them (an 8-pin cap, three fixed window choices, a 10–500 fetch
+ *  range), so a stored value outside them is one no operator could author
+ *  through the UI — and `pinnedLayers` is the one with no read-side backstop:
+ *  each entry renders a KPI tile and a list tab, so blanks and overflow reach
+ *  the page. */
+const ALARMS_WINDOW_CHOICES_MS = [20 * 60_000, 2 * 60 * 60_000, 4 * 60 * 60_000] as const;
+const MAX_PINNED_LAYERS = 8;
+const OVERVIEW_ALARMS_LIMIT_MIN = 10;
+const OVERVIEW_ALARMS_LIMIT_MAX = 500;
+
+/** `.min(1)` counts characters, so `"   "` satisfies it. These are REFINEMENTS
+ *  rather than `.trim()` transforms on purpose: the publish route stores the
+ *  caller's original object, not zod's parsed output, so a transform would
+ *  bless a value that is not the one persisted. */
+const nonBlank = z.string().refine((v) => v.trim().length > 0, { message: 'must not be blank' });
+
+export const alertTemplateSchema = z
+  .object({
+    pinnedLayers: z.array(nonBlank).max(MAX_PINNED_LAYERS),
+    defaultWindowMs: z
+      .number()
+      .int()
+      .refine((v) => (ALARMS_WINDOW_CHOICES_MS as readonly number[]).includes(v), {
+        message: `must be one of the alarm-page windows: ${ALARMS_WINDOW_CHOICES_MS.join(', ')} ms`,
+      }),
+    overviewAlarmsLimit: z
+      .number()
+      .int()
+      .min(OVERVIEW_ALARMS_LIMIT_MIN)
+      .max(OVERVIEW_ALARMS_LIMIT_MAX),
+  })
+  .strict();
+
+/** The theme id set lives in the UI (`AVAILABLE_THEMES`), which resolves an
+ *  unknown id to the default — so the BFF pins the shape and leaves the value
+ *  to the one place that owns the list. */
+export const themeTemplateSchema = z.object({ themeId: nonBlank }).strict();
+
+/** 31 days, the same ceiling the UI applies to a locally-stored override. */
+const MAX_DEFAULT_WINDOW_MINUTES = 60 * 24 * 31;
+
+export const timeDefaultsTemplateSchema = z
+  .object({
+    defaultWindowMinutes: z.number().int().positive().max(MAX_DEFAULT_WINDOW_MINUTES),
+  })
+  .strict();
diff --git a/apps/bff/src/logic/templates/bundled-validate-cli.ts b/apps/bff/src/logic/templates/bundled-validate-cli.ts
index edd2e61..ee90246 100644
--- a/apps/bff/src/logic/templates/bundled-validate-cli.ts
+++ b/apps/bff/src/logic/templates/bundled-validate-cli.ts
@@ -20,9 +20,11 @@
  *  non-zero on any finding — a broken bundled template is a shipping
  *  defect, not an operator error. */
 
-import { validateBundledTemplates } from './bundled-validate.js';
+import { validateBundledTemplates, singletonPresenceIssues } from './bundled-validate.js';
 
-const findings = validateBundledTemplates();
+// Presence is checked only here: this is the one caller that always runs
+// against the shipped bundle.
+const findings = [...singletonPresenceIssues(), ...validateBundledTemplates()];
 if (findings.length === 0) {
   console.log('templates:validate: no findings');
 } else {
diff --git a/apps/bff/src/logic/templates/bundled-validate.test.ts b/apps/bff/src/logic/templates/bundled-validate.test.ts
index e8cdddf..5fccf90 100644
--- a/apps/bff/src/logic/templates/bundled-validate.test.ts
+++ b/apps/bff/src/logic/templates/bundled-validate.test.ts
@@ -19,7 +19,11 @@ import { describe, it, expect } from 'vitest';
 import { mkdtempSync, mkdirSync, writeFileSync } from 'node:fs';
 import { tmpdir } from 'node:os';
 import { join } from 'node:path';
-import { validateBundledTemplates, type TemplateFinding } from './bundled-validate.js';
+import {
+  validateBundledTemplates,
+  singletonPresenceIssues,
+  type TemplateFinding,
+} from './bundled-validate.js';
 
 /** Minimal well-formed layer template — every negative case below is this
  *  with ONE field broken, so a finding can only come from that field. */
@@ -414,3 +418,54 @@ describe('validateBundledTemplates — overview dashboards', () => {
     expect(messages(findings)).toContain('requires a `layer`');
   });
 });
+
+// Every singleton loader hardcodes its filename and THROWS when the file is
+// missing — there is no default — and one of them is on the path of
+// `/api/configs/bundle`, which has no catch. So a rename that CI waved through
+// would 500 the route every page depends on. These fixtures prove the check
+// fires rather than only that today's tree happens to pass.
+describe('singletonPresenceIssues — the four files the runtime loads by exact path', () => {
+  const REQUIRED = [
+    'alert/page-setup.json',
+    'theme/active.json',
+    'time-defaults/global.json',
+    'infra-3d/config.json',
+  ];
+
+  /** A bundle root carrying exactly the singleton files named. */
+  function rootWith(paths: string[]): string {
+    const root = mkdtempSync(join(tmpdir(), 'singletons-'));
+    for (const rel of paths) {
+      const [dir, file] = rel.split('/');
+      mkdirSync(join(root, dir), { recursive: true });
+      writeFileSync(join(root, dir, file), '{}');
+    }
+    return root;
+  }
+
+  it('is clean when all four are present under their exact names', () => {
+    expect(singletonPresenceIssues(rootWith(REQUIRED))).toEqual([]);
+  });
+
+  it.each(REQUIRED)('reports %s when it is missing', (missing) => {
+    const findings = singletonPresenceIssues(rootWith(REQUIRED.filter((p) => p !== missing)));
+    expect(findings.map((f) => f.file)).toContain(missing);
+    expect(findings.find((f) => f.file === missing)?.message).toMatch(/missing/);
+  });
+
+  // The key is a separate constant, never derived from the filename, so an
+  // extra file is validated by the schema pass and then silently ignored at
+  // runtime — the worst kind of pass.
+  it('reports a renamed file twice: the required one is gone AND the new one is never read', () => {
+    const renamed = REQUIRED.filter((p) => p !== 'theme/active.json').concat('theme/actives.json');
+    const files = singletonPresenceIssues(rootWith(renamed)).map((f) => f.file);
+    expect(files).toContain('theme/active.json');
+    expect(files).toContain('theme/actives.json');
+  });
+
+  it('ignores a per-locale overlay sitting beside a singleton', () => {
+    const root = rootWith(REQUIRED);
+    writeFileSync(join(root, 'theme', 'active.i18n.zh-CN.json'), '{}');
+    expect(singletonPresenceIssues(root)).toEqual([]);
+  });
+});
diff --git a/apps/bff/src/logic/templates/bundled-validate.ts b/apps/bff/src/logic/templates/bundled-validate.ts
index 8e731ce..233d862 100644
--- a/apps/bff/src/logic/templates/bundled-validate.ts
+++ b/apps/bff/src/logic/templates/bundled-validate.ts
@@ -37,14 +37,22 @@
  * sibling test asserts the shipped bundle is clean.
  */
 
-import { readdirSync, readFileSync } from 'node:fs';
+import { existsSync, readdirSync, readFileSync } from 'node:fs';
 import { dirname, join, basename } from 'node:path';
 import { fileURLToPath } from 'node:url';
-import type { ZodError } from 'zod';
+import type { ZodError, ZodType } from 'zod';
 import { isOverlayFilename } from '../../i18n/store.js';
 import { widgetSchema } from '../dashboard/schema.js';
 import { expressionForServiceMetric } from '../../util/mqe-catalog.js';
-import { layerCrossRefIssues, layerTemplateSchema, overviewTemplateSchema } from './bundled-schema.js';
+import { validateInfra3dConfig } from '../infra-3d/validate.js';
+import {
+  alertTemplateSchema,
+  layerCrossRefIssues,
+  layerTemplateSchema,
+  overviewTemplateSchema,
+  themeTemplateSchema,
+  timeDefaultsTemplateSchema,
+} from './bundled-schema.js';
 
 export interface TemplateFinding {
   /** `layers/kafka.json` — relative to the bundled-templates root. */
@@ -258,8 +266,91 @@ function validateOverview(
   });
 }
 
-/** Validate every bundled layer + overview template. Returns one finding
- *  per defect; an empty array means the bundle is clean. */
+/** The non-dashboard bundle directories, each holding one singleton whose
+ *  shape a schema fully describes. They are validated with the SAME schemas
+ *  the admin push boundary uses, so CI and runtime cannot drift apart. */
+const SINGLETON_DIRS: { dir: string; schema: ZodType }[] = [
+  { dir: 'alert', schema: alertTemplateSchema },
+  { dir: 'theme', schema: themeTemplateSchema },
+  { dir: 'time-defaults', schema: timeDefaultsTemplateSchema },
+];
+
+// Shape-checks whatever singleton files a root happens to carry. PRESENCE is
+// a separate check — see `singletonPresenceIssues`, which the CLI runs against
+// the shipped bundle — because the fixture roots the tests build carry only
+// `layers/` and `overviews/`.
+function validateSingletons(root: string, findings: TemplateFinding[]): void {
+  for (const { dir, schema } of SINGLETON_DIRS) {
+    if (!existsSync(join(root, dir))) continue;
+    for (const src of readSources(root, dir, findings)) {
+      const parsed = schema.safeParse(src.content);
+      if (!parsed.success) {
+        for (const issue of parsed.error.issues) {
+          findings.push({ file: src.label, path: issue.path.join('.'), message: issue.message });
+        }
+      }
+    }
+  }
+  if (!existsSync(join(root, 'infra-3d'))) return;
+  for (const src of readSources(root, 'infra-3d', findings)) {
+    const result = validateInfra3dConfig(src.content);
+    if (!result.ok) {
+      for (const issue of result.issues) findings.push({ file: src.label, path: '', message: issue });
+    }
+  }
+}
+
+/**
+ * The four singleton files the runtime loads by exact path. Every loader
+ * hardcodes its filename and THROWS when it is missing — there is no default
+ * anywhere — and `iterateBundledTemplates` calls all four, so a missing or
+ * renamed file takes `GET /api/configs/bundle` (which has no catch) to a 500.
+ * The key is a separate constant, never derived from the filename, so an
+ * extra file in one of these directories is validated and then silently
+ * ignored at runtime — which is why the set is exact rather than a minimum.
+ */
+const REQUIRED_SINGLETONS = [
+  'alert/page-setup.json',
+  'theme/active.json',
+  'time-defaults/global.json',
+  'infra-3d/config.json',
+];
+
+/** Presence + naming check for the shipped bundle. Separate from
+ *  {@link validateBundledTemplates} because that one also runs over partial
+ *  fixture roots, where absence is expected. */
+export function singletonPresenceIssues(root: string = BUNDLED_ROOT): TemplateFinding[] {
+  const findings: TemplateFinding[] = [];
+  const dirs = new Set(REQUIRED_SINGLETONS.map((p) => p.split('/')[0]));
+  for (const rel of REQUIRED_SINGLETONS) {
+    if (!existsSync(join(root, rel))) {
+      findings.push({
+        file: rel,
+        path: '',
+        message: 'required bundled file is missing — its loader throws, taking /api/configs/bundle to a 500',
+      });
+    }
+  }
+  for (const dir of dirs) {
+    const abs = join(root, dir);
+    if (!existsSync(abs)) continue;
+    for (const file of readdirSync(abs).sort()) {
+      if (!file.endsWith('.json') || isOverlayFilename(file)) continue;
+      if (!REQUIRED_SINGLETONS.includes(`${dir}/${file}`)) {
+        findings.push({
+          file: `${dir}/${file}`,
+          path: '',
+          message: 'unexpected file — singleton keys are hardcoded, so the runtime never reads this one',
+        });
+      }
+    }
+  }
+  return findings;
+}
+
+/** Validate every bundled template — dashboards and singletons alike.
+ *  Returns one finding per defect; an empty array means the bundle is
+ *  clean. */
 export function validateBundledTemplates(root: string = BUNDLED_ROOT): TemplateFinding[] {
   const findings: TemplateFinding[] = [];
   const layers = readSources(root, 'layers', findings);
@@ -271,5 +362,6 @@ export function validateBundledTemplates(root: string = BUNDLED_ROOT): TemplateF
   );
   for (const src of layers) validateLayer(src, findings);
   for (const src of overviews) validateOverview(src, layerKeys, findings);
+  validateSingletons(root, findings);
   return findings;
 }
diff --git a/apps/bff/src/server.ts b/apps/bff/src/server.ts
index ff14e03..5f360d4 100644
--- a/apps/bff/src/server.ts
+++ b/apps/bff/src/server.ts
@@ -94,6 +94,7 @@ import { SourceMapStore } from './logic/browser-errors/store.js';
 import { serviceLayerCatalog } from './logic/services/service-layer-catalog.js';
 import { HttpError } from './errors.js';
 import { logger, loggerOptions } from './logger.js';
+import { SECURITY_HEADERS, API_CACHE_CONTROL, isApiPath } from './util/security-headers.js';
 
 const configPath = process.env.HORIZON_CONFIG ?? './horizon.yaml';
 
@@ -170,13 +171,14 @@ app.setErrorHandler((err, req, reply) => {
   });
 });
 
-// Baseline security headers on every response (MIME-sniff / clickjacking /
-// referrer leakage). Defense-in-depth for the console behind the operator's
-// ingress; no third-party dependency.
-app.addHook('onSend', (_req, reply, payload, done) => {
-  reply.header('X-Content-Type-Options', 'nosniff');
-  reply.header('X-Frame-Options', 'DENY');
-  reply.header('Referrer-Policy', 'no-referrer');
+// Security headers on every response — CSP, MIME-sniff, clickjacking,
+// referrer leakage. Defense-in-depth for the console behind the operator's
+// ingress; no third-party dependency. The AI SSE route hijacks the reply and
+// therefore bypasses this hook, so it writes the same map itself.
+app.addHook('onSend', (req, reply, payload, done) => {
+  for (const [name, value] of Object.entries(SECURITY_HEADERS)) reply.header(name, value);
+  // Static assets are content-hashed and stay cacheable; API data never is.
+  if (isApiPath(req.url)) reply.header('Cache-Control', API_CACHE_CONTROL);
   done(null, payload);
 });
 
diff --git a/apps/bff/src/util/link-policy.test.ts b/apps/bff/src/util/link-policy.test.ts
new file mode 100644
index 0000000..8ed20b1
--- /dev/null
+++ b/apps/bff/src/util/link-policy.test.ts
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { describe, it, expect } from 'vitest';
+import { linkSchemeIssue, linkDomainIssue } from './link-policy.js';
+import { layerTemplatePushSchema } from '../logic/templates/bundled-schema.js';
+
+describe('linkSchemeIssue', () => {
+  // The reason this check exists: the value is bound to an `href` in the
+  // layer header, and the store it comes from validates nothing.
+  it.each([
+    'javascript:alert(1)',
+    'JaVaScRiPt:alert(1)',
+    '  javascript:alert(1)  ',
+    'data:text/html,<script>alert(1)</script>',
+    'vbscript:msgbox(1)',
+    'file:///etc/passwd',
+  ])('refuses %s', (value) => {
+    expect(linkSchemeIssue(value)).not.toBeNull();
+  });
+
+  // An internal deployment may have no TLS and may host its runbook on the
+  // same origin — neither is a reason to reject.
+  it.each([
+    'https://skywalking.apache.org/docs/',
+    'http://wiki.internal/runbook',
+    'http://10.0.0.5:8080/docs',
+    '/internal-docs/general',
+    '',
+    '   ',
+  ])('accepts %s', (value) => {
+    expect(linkSchemeIssue(value)).toBeNull();
+  });
+
+  // `//host/x` reads like a path but inherits the page scheme and leaves the
+  // origin, so it must not pass as "site-relative".
+  it('refuses a protocol-relative URL', () => {
+    expect(linkSchemeIssue('//evil.example/x')).not.toBeNull();
+  });
+
+  // Browsers normalise backslashes inside special URLs, so each of these
+  // resolves to https://evil.example/x — confirmed in Chromium, Firefox and
+  // WebKit. A prefix test on "/" would accept them as same-origin and skip
+  // the domain allow-list, defeating `trustedLinkDomains: []`.
+  it.each(['/\\evil.example/x', '\\/evil.example/x', '/\\\\evil.example/x', '\\\\evil.example/x'])(
+    'refuses the backslash-normalised escape %s',
+    (value) => {
+      expect(linkSchemeIssue(value)).not.toBeNull();
+    },
+  );
+});
+
+describe('linkDomainIssue', () => {
+  const trusted = ['skywalking.apache.org', 'wiki.internal'];
+
+  it('accepts a listed host and its subdomains', () => {
+    expect(linkDomainIssue('https://skywalking.apache.org/docs/', trusted)).toBeNull();
+    expect(linkDomainIssue('https://docs.wiki.internal/x', trusted)).toBeNull();
+  });
+
+  it('refuses an unlisted host, naming it', () => {
+    expect(linkDomainIssue('https://evil.example/x', trusted)).toContain('evil.example');
+  });
+
+  // A host that merely ENDS with the trusted string is a different host —
+  // `notwiki.internal` is not a subdomain of `wiki.internal`, and an attacker
+  // registering `skywalking.apache.org.evil.com` must not inherit trust.
+  it('does not treat a lookalike suffix as a subdomain', () => {
+    expect(linkDomainIssue('https://notwiki.internal/x', ['wiki.internal'])).not.toBeNull();
+    expect(linkDomainIssue('https://skywalking.apache.org.evil.com/x', trusted)).not.toBeNull();
+  });
+
+  it('never blocks a site-relative link, whatever the list says', () => {
+    expect(linkDomainIssue('/runbook/kafka', [])).toBeNull();
+  });
+
+  // The closed-console guarantee has to survive the same escape. The domain
+  // check defers a malformed value to linkSchemeIssue rather than reporting
+  // it twice, so the guarantee lives in the pair — which is how both call
+  // sites apply it (`linkSchemeIssue(v) ?? linkDomainIssue(v, …)`).
+  it.each(['/\\evil.example/x', '\\/evil.example/x'])(
+    'rejects %s through the pair, with an empty allow-list or a populated one',
+    (value) => {
+      for (const list of [[], ['skywalking.apache.org']]) {
+        expect(linkSchemeIssue(value) ?? linkDomainIssue(value, list)).not.toBeNull();
+      }
+    },
+  );
+
+  // An empty list is the fully-closed console, not "unconfigured".
+  it('refuses every outbound link when the list is empty', () => {
+    expect(linkDomainIssue('https://skywalking.apache.org/x', [])).toContain('empty');
+  });
+});
+
+describe('the layer push schema applies the scheme check', () => {
+  const base = { key: 'GENERAL', components: {}, dashboards: {} };
+
+  it('refuses a stored javascript: documentLink with a reason naming the scheme', () => {
+    const parsed = layerTemplatePushSchema.safeParse({
+      ...base,
+      documentLink: 'javascript:alert(document.domain)',
+    });
+    expect(parsed.success).toBe(false);
+    if (parsed.success) return;
+    const issue = parsed.error.issues.find((i) => i.path[0] === 'documentLink');
+    expect(issue?.message).toContain('javascript:');
+  });
+
+  it('still accepts the shape every bundled template uses', () => {
+    const parsed = layerTemplatePushSchema.safeParse({
+      ...base,
+      documentLink: 'https://skywalking.apache.org/docs/main/next/en/setup/',
+    });
+    expect(parsed.success).toBe(true);
+  });
+});
diff --git a/apps/bff/src/util/link-policy.ts b/apps/bff/src/util/link-policy.ts
new file mode 100644
index 0000000..f3a34be
--- /dev/null
+++ b/apps/bff/src/util/link-policy.ts
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Policy for the outbound links a template may carry. Today that is exactly
+ * one field — a layer template's `documentLink`, rendered as the "docs ↗"
+ * anchor in the layer header — but the checks live here so a second one
+ * cannot arrive without a policy.
+ *
+ * Two independent checks, deliberately separated because only one of them
+ * needs configuration:
+ *
+ *   - {@link linkSchemeIssue} is pure and belongs in the push schema. It is
+ *     the security check: a stored `javascript:` value reaching an `href` is
+ *     script execution in the operator's session.
+ *   - {@link linkDomainIssue} takes the operator's allow-list, so it runs
+ *     where config is in hand. It is a policy check, not a vulnerability
+ *     fix: whoever can set `documentLink` already holds `dashboard:write`.
+ *
+ * Both are applied on the WRITE path (so the operator gets a reason) and on
+ * the READ path (because the template store is OAP, which validates nothing
+ * and can be written without going through Horizon at all).
+ */
+
+/**
+ * A value is "site-relative" only if resolving it against an origin actually
+ * KEEPS that origin. Testing the string shape instead is not safe: browsers
+ * normalise backslashes inside special URLs, so `/\evil.example/x` and
+ * `\/evil.example/x` both resolve to `https://evil.example/x` — verified in
+ * Chromium, Firefox and WebKit. A prefix test would wave those through as
+ * same-origin and skip the domain allow-list entirely, which is exactly the
+ * guarantee `trustedLinkDomains: []` is supposed to give.
+ *
+ * Delegating to the URL parser rather than blocking one character also covers
+ * the next quirk without needing to know it.
+ */
+const SAME_ORIGIN_PROBE = 'https://horizon.invalid';
+
+function staysSameOrigin(value: string): boolean {
+  try {
+    return new URL(value, SAME_ORIGIN_PROBE).origin === SAME_ORIGIN_PROBE;
+  } catch {
+    return false;
+  }
+}
+
+/** True when the value never leaves this origin, however it is spelled. */
+function isSiteRelative(value: string): boolean {
+  // Must not carry its own scheme AND must resolve back to the probe origin.
+  try {
+    new URL(value);
+    return false; // parsed standalone ⇒ absolute
+  } catch {
+    return staysSameOrigin(value);
+  }
+}
+
+/**
+ * The whole policy in one call — what every render path must apply.
+ *
+ * There is more than one route that can put a `documentLink` in front of a
+ * user: the menu, and the layer-template list the layer page falls back to
+ * when OAP does not list a layer yet. Both render the same anchor, so both
+ * ask this, and a new route that forgets to is the failure mode this exists
+ * to make hard.
+ */
+export function documentLinkIssue(
+  raw: string,
+  trustedDomains: readonly string[],
+): string | null {
+  return linkSchemeIssue(raw) ?? linkDomainIssue(raw, trustedDomains);
+}
+
+/** Scheme check. Returns null when the value is safe to bind to an `href`.
+ *
+ *  A site-relative path is allowed: an internal deployment may host its
+ *  runbook on the same origin. Everything else must parse as http(s) —
+ *  enumerating the dangerous schemes instead would mean predicting them. */
+export function linkSchemeIssue(raw: string): string | null {
+  const value = raw.trim();
+  if (value === '') return null;
+  if (isSiteRelative(value)) return null;
+  let url: URL;
+  try {
+    url = new URL(value);
+  } catch {
+    return 'must be an absolute http(s) URL or a path that stays on this site';
+  }
+  if (url.protocol !== 'http:' && url.protocol !== 'https:') {
+    return `scheme "${url.protocol}" is not allowed — only http, https, or a same-origin path`;
+  }
+  return null;
+}
+
+/** Allow-list check against `security.trustedLinkDomains`. An empty
+ *  allow-list means "no outbound links at all" — a deliberate, fully closed
+ *  console — so it is not treated as "unset". A site-relative path is always
+ *  fine; it never leaves the origin. */
+export function linkDomainIssue(raw: string, trustedDomains: readonly string[]): string | null {
+  const value = raw.trim();
+  if (value === '') return null;
+  if (isSiteRelative(value)) return null;
+  let host: string;
+  try {
+    host = new URL(value).hostname.toLowerCase();
+  } catch {
+    return null; // shape is linkSchemeIssue's job; don't report it twice
+  }
+  const trusted = trustedDomains.some((d) => {
+    const domain = d.trim().toLowerCase().replace(/^\.+/, '');
+    if (!domain) return false;
+    return host === domain || host.endsWith(`.${domain}`);
+  });
+  if (trusted) return null;
+  return trustedDomains.length === 0
+    ? `outbound links are disabled — "${host}" is rejected because security.trustedLinkDomains is empty`
+    : `host "${host}" is not in security.trustedLinkDomains`;
+}
diff --git a/apps/bff/src/util/security-headers.test.ts b/apps/bff/src/util/security-headers.test.ts
new file mode 100644
index 0000000..1aa0959
--- /dev/null
+++ b/apps/bff/src/util/security-headers.test.ts
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { describe, it, expect } from 'vitest';
+import { readFileSync } from 'node:fs';
+import { dirname, join } from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { SECURITY_HEADERS, API_CACHE_CONTROL, isApiPath } from './security-headers.js';
+
+const HERE = dirname(fileURLToPath(import.meta.url));
+const csp = SECURITY_HEADERS['Content-Security-Policy'];
+const directive = (name: string): string | undefined =>
+  csp
+    .split(';')
+    .map((d) => d.trim())
+    .find((d) => d === name || d.startsWith(`${name} `));
+
+describe('the content security policy keeps the properties it was derived for', () => {
+  // This is the directive that does the work: it makes an injected `onerror=`
+  // attribute and a stored `javascript:` href inert. Nothing in the app needs
+  // either keyword — the built page has no inline script and Vue ships
+  // runtime-only — so granting one would be silent, and would remove the only
+  // barrier between a stored-config HTML sink and script execution.
+  it('never grants inline or eval to scripts', () => {
+    expect(directive('script-src')).toBe("script-src 'self'");
+    expect(csp).not.toContain("'unsafe-eval'");
+    expect(csp).not.toContain('wasm-unsafe-eval');
+  });
+
+  // `child-src` looks like an iframe directive and is not: it is the
+  // pre-`worker-src` fallback older engines use, so `'none'` here kills every
+  // Monaco editor on them. Iframes are locked by `frame-src`.
+  it('does not strand workers on engines without worker-src', () => {
+    expect(directive('child-src')).toBe("child-src 'self'");
+    expect(directive('frame-src')).toBe("frame-src 'none'");
+  });
+
+  // Neither inherits from `default-src`, so dropping them is invisible.
+  it('states the directives that do not inherit from default-src', () => {
+    expect(directive('base-uri')).toBe("base-uri 'none'");
+    expect(directive('form-action')).toBeDefined();
+  });
+
+  // Four producers need `data:` images (Vite's sub-4KB inlining, the 3D map's
+  // baked SVG textures, authored CSS backgrounds, Monaco's squiggles), and
+  // nothing anywhere loads from another origin.
+  it('allows data: images and no remote origin at all', () => {
+    expect(directive('img-src')).toBe("img-src 'self' data:");
+    expect(csp).not.toMatch(/https?:\/\//);
+    expect(directive('connect-src')).toBe("connect-src 'self'");
+  });
+
+  // Removed from CSP3 in 2022 and never shipped: emitting it is false
+  // assurance. Restricting where a link goes is an application-level check.
+  it('does not emit the retired navigate-to directive', () => {
+    expect(csp).not.toContain('navigate-to');
+  });
+
+  it('keeps the pre-CSP2 clickjacking header alongside frame-ancestors', () => {
+    expect(SECURITY_HEADERS['X-Frame-Options']).toBe('DENY');
+    expect(directive('frame-ancestors')).toBe("frame-ancestors 'none'");
+  });
+
+  // The AI chat route hijacks the reply, so it bypasses the global onSend hook
+  // and writes its own head. It must spread this same map rather than restate
+  // the headers, or the two silently diverge — which is exactly how the CSP
+  // would come to be missing on one route only.
+  it('is the single source both emitters use', () => {
+    const sse = readFileSync(join(HERE, '../ai/http/chat.ts'), 'utf8');
+    expect(sse).toContain('...SECURITY_HEADERS');
+    expect(sse).not.toContain("'X-Frame-Options': 'DENY'");
+
+    const server = readFileSync(join(HERE, '../server.ts'), 'utf8');
+    expect(server).toContain('Object.entries(SECURITY_HEADERS)');
+  });
+});
+
+describe('API responses are never stored', () => {
+  it('is no-store, not merely revalidate-before-reuse', () => {
+    // `max-age=0, must-revalidate` still lets a browser write the body to
+    // disk; on a shared workstation that outlives the session allowed to see
+    // it. Two routes used to set exactly that and now rely on this instead.
+    expect(API_CACHE_CONTROL).toBe('no-store');
+  });
+
+  it.each([
+    '/api/menu',
+    '/api/menu?ts=1',
+    '/api/configs/bundle',
+    '/api/ai/chat',
+    '/api',
+  ])('applies to %s', (url) => {
+    expect(isApiPath(url)).toBe(true);
+  });
+
+  // The built SPA's assets are content-hashed and must stay cacheable — the
+  // rule keys on the path for exactly this reason.
+  it.each(['/', '/index.html', '/assets/index-abc123.js', '/favicon.svg', '/apidocs', '/layer/api'])(
+    'does not apply to %s',
+    (url) => {
+      expect(isApiPath(url)).toBe(false);
+    },
+  );
+});
diff --git a/apps/bff/src/util/security-headers.ts b/apps/bff/src/util/security-headers.ts
new file mode 100644
index 0000000..fa1753b
--- /dev/null
+++ b/apps/bff/src/util/security-headers.ts
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * The security headers every response carries. One definition, because there
+ * are two places that emit them: the global `onSend` hook, and the AI SSE
+ * route, which hijacks the reply and writes its own head — a split that will
+ * silently diverge the moment someone edits only one of them.
+ *
+ * Sent as a response header rather than a `<meta http-equiv>`: `frame-ancestors`
+ * and the Report-Only variant are ignored in meta form, and the dev server
+ * serves the same `index.html`, where `connect-src 'self'` would kill HMR.
+ */
+
+/**
+ * Every directive value here is derived from what the app actually loads, not
+ * from a template. The non-obvious ones:
+ *
+ * - `script-src 'self'` with no `'unsafe-inline'` / `'unsafe-eval'`. The built
+ *   `index.html` carries one external module tag and no inline script; Vue is
+ *   the runtime-only build (no template compiler); Monaco's workers are
+ *   emitted as same-origin files, so `blob:` is not needed either. This is the
+ *   directive that matters — it is what makes an injected `onerror=` attribute
+ *   or a stored `javascript:` href inert.
+ * - `style-src 'unsafe-inline'` is unavoidable and is NOT about Vue's `:style`
+ *   bindings (those go through the CSSOM, which CSP does not govern). ECharts
+ *   builds tooltip markup with inline style attributes, Monaco injects theme
+ *   `<style>` elements, and Vue's compiler re-serializes hoisted static
+ *   subtrees — none expose a nonce hook, and a nonce would make
+ *   `'unsafe-inline'` be ignored, breaking all three.
+ * - `img-src data:` is required by four independent producers: Vite inlines
+ *   assets under 4 KB, the 3D map bakes SVG icon textures, three authored CSS
+ *   backgrounds, and Monaco's runtime-injected squiggle rules.
+ * - `child-src 'self'` must NOT be `'none'`: it is the pre-`worker-src`
+ *   fallback older engines use for workers, so `'none'` kills every Monaco
+ *   editor there. Iframes are locked by `frame-src 'none'`.
+ * - `base-uri` and `form-action` do not inherit from `default-src`, so they
+ *   are stated explicitly.
+ *
+ * `navigate-to` is deliberately absent — it was removed from CSP Level 3 in
+ * 2022 and never shipped anywhere. Nothing in CSP constrains where a plain
+ * `<a href>` navigates; restricting an operator-supplied link is an
+ * application-level check, not a policy directive.
+ */
+const CONTENT_SECURITY_POLICY = [
+  "default-src 'none'",
+  "script-src 'self'",
+  "style-src 'self' 'unsafe-inline'",
+  "img-src 'self' data:",
+  "font-src 'self' data:",
+  "connect-src 'self'",
+  "worker-src 'self'",
+  "child-src 'self'",
+  "frame-src 'none'",
+  "media-src 'none'",
+  "object-src 'none'",
+  "base-uri 'none'",
+  "form-action 'self'",
+  "frame-ancestors 'none'",
+].join('; ');
+
+/** `X-Frame-Options` is kept alongside `frame-ancestors` for engines that
+ *  predate CSP Level 2; the two say the same thing. */
+export const SECURITY_HEADERS: Readonly<Record<string, string>> = Object.freeze({
+  'Content-Security-Policy': CONTENT_SECURITY_POLICY,
+  'X-Content-Type-Options': 'nosniff',
+  'X-Frame-Options': 'DENY',
+  'Referrer-Policy': 'no-referrer',
+});
+
+/**
+ * API responses are never stored. Everything under `/api/` is either
+ * authenticated data read out of OAP or the operator's own configuration, so
+ * none of it belongs in a browser's disk cache, a shared proxy, or the
+ * back/forward store — on a shared workstation those outlive the session that
+ * was allowed to see them.
+ *
+ * `no-store` is deliberately stronger than `max-age=0, must-revalidate`: the
+ * latter still permits the body to be written to disk and merely requires a
+ * revalidation before reuse.
+ *
+ * This applies to `/api/` ONLY. The built SPA's assets are content-hashed and
+ * must stay cacheable, so the rule keys on the path rather than riding in
+ * {@link SECURITY_HEADERS}.
+ */
+export const API_CACHE_CONTROL = 'no-store';
+
+export function isApiPath(url: string): boolean {
+  const path = url.split('?')[0];
+  return path === '/api' || path.startsWith('/api/');
+}
diff --git a/apps/ui/eslint.config.mjs b/apps/ui/eslint.config.mjs
index 70a90a9..9914cbd 100644
--- a/apps/ui/eslint.config.mjs
+++ b/apps/ui/eslint.config.mjs
@@ -45,4 +45,60 @@ export default [
     ignores: ['**/*.test.ts', '**/*.d.ts'],
     rules: { 'max-lines': ['error', { max: 2000, skipComments: true, skipBlankLines: true }] },
   },
+  {
+    // Markup and script sinks. `flat/essential` does not carry
+    // `vue/no-v-html`, so every one of these could be introduced without a
+    // reviewer being told — which is how a dashboard-config value reaches an
+    // HTML string. Each existing use is legitimate and now says so with an
+    // explicit disable line, so the next one has to argue for itself.
+    // Rendering data belongs in `{{ }}`, d3 `.text()`, or the shared escaper.
+    files: ['src/**/*.vue', 'src/**/*.ts'],
+    ignores: ['**/*.test.ts', '**/*.d.ts'],
+    rules: {
+      'vue/no-v-html': 'error',
+      'no-eval': 'error',
+      'no-implied-eval': 'error',
+      'no-new-func': 'error',
+      'no-restricted-syntax': [
+        'error',
+        {
+          // A string literal is developer-authored; anything else carries a
+          // value from somewhere, and `host.innerHTML = ''` (clearing a d3
+          // host before re-render) stays legal.
+          selector: "AssignmentExpression[left.property.name='innerHTML'][right.type!='Literal']",
+          message:
+            'innerHTML with a computed value is an HTML sink — render through {{ }}, d3 .text(), or escape it.',
+        },
+        {
+          // `el['innerHTML'] = x` reaches the same setter but parses as a
+          // COMPUTED member, where the key is `property.value`, not
+          // `property.name` — so the selector above never saw it.
+          selector:
+            "AssignmentExpression[left.computed=true][left.property.value='innerHTML'][right.type!='Literal']",
+          message:
+            'innerHTML with a computed value is an HTML sink — render through {{ }}, d3 .text(), or escape it.',
+        },
+        {
+          // `Object.assign(el, { innerHTML: x })` assigns it without ever
+          // writing an AssignmentExpression.
+          selector:
+            "CallExpression[callee.object.name='Object'][callee.property.name='assign'] Property[key.name=/^(innerHTML|outerHTML)$/]",
+          message:
+            'assigning innerHTML/outerHTML through Object.assign is an HTML sink — build the node instead.',
+        },
+        {
+          selector: "AssignmentExpression[left.property.name='outerHTML']",
+          message: 'outerHTML is an HTML sink — build the node instead.',
+        },
+        {
+          selector: "CallExpression[callee.property.name='insertAdjacentHTML']",
+          message: 'insertAdjacentHTML is an HTML sink — build the node instead.',
+        },
+        {
+          selector: "CallExpression[callee.object.name='document'][callee.property.name='write']",
+          message: 'document.write is an HTML sink and blocks parsing.',
+        },
+      ],
+    },
+  },
 ];
diff --git a/apps/ui/index.html b/apps/ui/index.html
index 1570956..3833235 100644
--- a/apps/ui/index.html
+++ b/apps/ui/index.html
@@ -19,7 +19,7 @@
   <head>
     <meta charset="UTF-8" />
     <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
-    <link rel="alternate icon" type="image/x-icon" href="/favicon.ico" />
+    <link rel="alternate icon" type="image/png" href="/favicon.png" />
     <meta name="viewport" content="width=device-width, initial-scale=1" />
     <!-- Inter + JetBrains Mono are self-hosted via @fontsource-variable
          (imported in src/main.ts). The Google Fonts CDN dependency was
diff --git a/apps/ui/package.json b/apps/ui/package.json
index e38f0f9..d767e46 100644
--- a/apps/ui/package.json
+++ b/apps/ui/package.json
@@ -19,22 +19,16 @@
     "@fontsource-variable/jetbrains-mono": "^5.3.0",
     "@skywalking-horizon-ui/api-client": "workspace:*",
     "@skywalking-horizon-ui/design-tokens": "workspace:*",
-    "@skywalking-horizon-ui/templates": "workspace:*",
     "@tanstack/vue-query": "^5.101.4",
     "@tresjs/cientos": "^5.8.1",
     "@tresjs/core": "^5.8.3",
-    "@vueuse/core": "^11.3.0",
     "d3": "^7.9.0",
     "d3-flame-graph": "^4.1.3",
     "echarts": "^6.1.0",
-    "element-plus": "^2.14.3",
-    "graphql": "^16.14.2",
-    "graphql-request": "^7.4.0",
     "monaco-editor": "^0.55.1",
     "pinia": "^2.3.1",
     "three": "^0.184.0",
     "vue": "^3.5.40",
-    "vue-grid-layout": "3.0.0-beta1",
     "vue-i18n": "^10.0.8",
     "vue-router": "^4.6.4"
   },
diff --git a/apps/ui/public/favicon.ico b/apps/ui/public/favicon.png
similarity index 100%
rename from apps/ui/public/favicon.ico
rename to apps/ui/public/favicon.png
diff --git a/apps/ui/src/assets/topology-icons/EVENTMESH.png b/apps/ui/src/assets/topology-icons/EVENTMESH.jpg
similarity index 100%
rename from apps/ui/src/assets/topology-icons/EVENTMESH.png
rename to apps/ui/src/assets/topology-icons/EVENTMESH.jpg
diff --git a/apps/ui/src/assets/topology-icons/NATS.png b/apps/ui/src/assets/topology-icons/NATS.png
index 182aee6..3ae89dd 100644
Binary files a/apps/ui/src/assets/topology-icons/NATS.png and b/apps/ui/src/assets/topology-icons/NATS.png differ
diff --git a/apps/ui/src/assets/topology-icons/SEATA.png b/apps/ui/src/assets/topology-icons/SEATA.jpg
similarity index 100%
rename from apps/ui/src/assets/topology-icons/SEATA.png
rename to apps/ui/src/assets/topology-icons/SEATA.jpg
diff --git a/apps/ui/src/assets/topology-icons/ZOOKEEPER.png b/apps/ui/src/assets/topology-icons/ZOOKEEPER.png
index 4e8014f..4d94741 100644
Binary files a/apps/ui/src/assets/topology-icons/ZOOKEEPER.png and b/apps/ui/src/assets/topology-icons/ZOOKEEPER.png differ
diff --git a/apps/ui/src/features/auth/LoginView.vue b/apps/ui/src/features/auth/LoginView.vue
index f9bb174..c39e7a4 100644
--- a/apps/ui/src/features/auth/LoginView.vue
+++ b/apps/ui/src/features/auth/LoginView.vue
@@ -116,6 +116,7 @@ async function submit(): Promise<void> {
     <!-- Top: SkyWalking logo + Horizon wordmark + inline auth-status pill. -->
     <header class="top">
       <span class="brand">
+        <!-- eslint-disable-next-line vue/no-v-html -- build-time `?raw` import of a bundled SVG constant; no runtime input reaches it, and scripts/check-security.mjs scans the ?raw set for active content -->
         <span class="brand-logo" v-html="logoSw" />
         <span class="brand-sep" aria-hidden="true" />
         <span class="brand-name">{{ t('Horizon') }}</span>
diff --git a/apps/ui/src/features/infra-3d/Infra3DView.vue b/apps/ui/src/features/infra-3d/Infra3DView.vue
index 35c1f44..6d234b6 100644
--- a/apps/ui/src/features/infra-3d/Infra3DView.vue
+++ b/apps/ui/src/features/infra-3d/Infra3DView.vue
@@ -501,6 +501,7 @@ function onPanelZoneFocus(zoneKey: string): void {
            the server root, which lands on an empty page under a gateway
            sub-path. router-link prepends the base and stays in-SPA. -->
       <router-link class="sw-brand" to="/" :title="t('Back to Horizon')">
+        <!-- eslint-disable-next-line vue/no-v-html -- build-time `?raw` import of a bundled SVG constant; no runtime input reaches it, and scripts/check-security.mjs scans the ?raw set for active content -->
         <span class="sw-brand-logo" v-html="logoSw" />
         <span class="sw-brand-text">
           <span class="sw-brand-line1">Apache SkyWalking</span>
diff --git a/apps/ui/src/shell/AppSidebar.vue b/apps/ui/src/shell/AppSidebar.vue
index a77d592..01394d5 100644
--- a/apps/ui/src/shell/AppSidebar.vue
+++ b/apps/ui/src/shell/AppSidebar.vue
@@ -124,6 +124,7 @@ function isLayerDiverged(key: string): boolean {
          the rail keeps just the expand chevron in the 44px header row. -->
     <div v-if="!sidebarCollapsed" class="sw-brand-row">
       <RouterLink to="/" class="sw-brand" aria-label="SkyWalking Horizon">
+        <!-- eslint-disable-next-line vue/no-v-html -- build-time `?raw` import of a bundled SVG constant; no runtime input reaches it, and scripts/check-security.mjs scans the ?raw set for active content -->
         <span class="brand-logo" v-html="isLightAppearance ? logoSwBlue : logoSw" />
         <small>Horizon</small>
       </RouterLink>
diff --git a/apps/ui/src/shell/AppTopbar.vue b/apps/ui/src/shell/AppTopbar.vue
index 71627f7..98514be 100644
--- a/apps/ui/src/shell/AppTopbar.vue
+++ b/apps/ui/src/shell/AppTopbar.vue
@@ -54,6 +54,7 @@ const isLightAppearance = computed<boolean>(
 <template>
   <header class="sw-top">
     <RouterLink v-if="sidebarCollapsed" to="/" class="top-brand" :aria-label="t('SkyWalking Horizon')">
+      <!-- eslint-disable-next-line vue/no-v-html -- build-time `?raw` import of a bundled SVG constant; no runtime input reaches it, and scripts/check-security.mjs scans the ?raw set for active content -->
       <span class="top-brand-logo" v-html="isLightAppearance ? logoSwBlue : logoSw" />
       <small>{{ t('Horizon') }}</small>
     </RouterLink>
diff --git a/dist-material/release-docs/LICENSE b/dist-material/release-docs/LICENSE
index c86baa0..57aa4cb 100644
--- a/dist-material/release-docs/LICENSE
+++ b/dist-material/release-docs/LICENSE
@@ -221,7 +221,7 @@
 
 --- (MPL-2.0 OR Apache-2.0) ---
 
-  * dompurify@3.4.12 (licenses/dompurify-3.4.12/LICENSE)
+  * dompurify@3.4.13 (licenses/dompurify-3.4.13/LICENSE)
 
 --- 0BSD ---
 
@@ -270,11 +270,10 @@
 --- BSD-3-Clause ---
 
   * d3-ease@3.0.1 (licenses/d3-ease-3.0.1/LICENSE)
-  * fast-uri@3.1.4 (licenses/fast-uri-3.1.4/LICENSE)
-  * fast-uri@4.1.1 (licenses/fast-uri-4.1.1/LICENSE)
+  * fast-uri@3.1.5 (licenses/fast-uri-3.1.5/LICENSE)
+  * fast-uri@4.1.2 (licenses/fast-uri-4.1.2/LICENSE)
   * ieee754@1.2.1 (licenses/ieee754-1.2.1/LICENSE)
   * light-my-request@6.6.0 (licenses/light-my-request-6.6.0/LICENSE)
-  * normalize-wheel-es@1.2.0 (licenses/normalize-wheel-es-1.2.0/LICENSE)
   * rw@1.3.3 (licenses/rw-1.3.3/LICENSE)
   * secure-json-parse@2.7.0 (licenses/secure-json-parse-2.7.0/LICENSE.md)
   * secure-json-parse@4.1.0 (licenses/secure-json-parse-4.1.0/LICENSE)
@@ -342,8 +341,6 @@
   * @babel/parser@7.29.7 (licenses/@babel__parser-7.29.7/LICENSE)
   * @babel/types@7.29.7 (licenses/@babel__types-7.29.7/LICENSE)
   * @cfworker/json-schema@4.1.1
-  * @ctrl/tinycolor@4.2.0 (licenses/@ctrl__tinycolor-4.2.0/LICENSE)
-  * @element-plus/icons-vue@2.3.2 (licenses/@element-plus__icons-vue-2.3.2/LICENSE)
   * @fastify/accept-negotiator@2.0.1 (licenses/@fastify__accept-negotiator-2.0.1/LICENSE)
   * @fastify/ajv-compiler@4.0.5 (licenses/@fastify__ajv-compiler-4.0.5/LICENSE)
   * @fastify/busboy@3.2.0 (licenses/@fastify__busboy-3.2.0/LICENSE)
@@ -357,24 +354,6 @@
   * @fastify/proxy-addr@5.1.0 (licenses/@fastify__proxy-addr-5.1.0/LICENSE)
   * @fastify/send@4.1.0 (licenses/@fastify__send-4.1.0/LICENSE)
   * @fastify/static@10.1.2 (licenses/@fastify__static-10.1.2/LICENSE)
-  * @floating-ui/core@1.8.0 (licenses/@floating-ui__core-1.8.0/LICENSE)
-  * @floating-ui/dom@1.8.0 (licenses/@floating-ui__dom-1.8.0/LICENSE)
-  * @floating-ui/utils@0.2.12 (licenses/@floating-ui__utils-0.2.12/LICENSE)
-  * @graphql-typed-document-node/core@3.2.0 (licenses/@graphql-typed-document-node__core-3.2.0/LICENSE)
-  * @interactjs/actions@1.10.27 (licenses/@interactjs__actions-1.10.27/LICENSE)
-  * @interactjs/auto-scroll@1.10.27 (licenses/@interactjs__auto-scroll-1.10.27/LICENSE)
-  * @interactjs/auto-start@1.10.27 (licenses/@interactjs__auto-start-1.10.27/LICENSE)
-  * @interactjs/core@1.10.27 (licenses/@interactjs__core-1.10.27/LICENSE)
-  * @interactjs/dev-tools@1.10.27 (licenses/@interactjs__dev-tools-1.10.27/LICENSE)
-  * @interactjs/inertia@1.10.27 (licenses/@interactjs__inertia-1.10.27/LICENSE)
-  * @interactjs/interact@1.10.27 (licenses/@interactjs__interact-1.10.27/LICENSE)
-  * @interactjs/interactjs@1.10.27 (licenses/@interactjs__interactjs-1.10.27/LICENSE)
-  * @interactjs/modifiers@1.10.27 (licenses/@interactjs__modifiers-1.10.27/LICENSE)
-  * @interactjs/offset@1.10.27 (licenses/@interactjs__offset-1.10.27/LICENSE)
-  * @interactjs/pointer-events@1.10.27 (licenses/@interactjs__pointer-events-1.10.27/LICENSE)
-  * @interactjs/reflow@1.10.27 (licenses/@interactjs__reflow-1.10.27/LICENSE)
-  * @interactjs/snappers@1.10.27 (licenses/@interactjs__snappers-1.10.27/LICENSE)
-  * @interactjs/utils@1.10.27 (licenses/@interactjs__utils-1.10.27/LICENSE)
   * @intlify/core-base@10.0.8 (licenses/@intlify__core-base-10.0.8/LICENSE)
   * @intlify/message-compiler@10.0.8 (licenses/@intlify__message-compiler-10.0.8/LICENSE)
   * @intlify/shared@10.0.8 (licenses/@intlify__shared-10.0.8/LICENSE)
@@ -392,7 +371,6 @@
   * @phc/format@1.0.0 (licenses/@phc__format-1.0.0/license)
   * @pinojs/redact@0.4.0 (licenses/@pinojs__redact-0.4.0/LICENSE)
   * @pmndrs/pointer-events@6.6.30 (licenses/@pmndrs__pointer-events-6.6.30/LICENSE)
-  * @popperjs/core@2.11.8 (licenses/@popperjs__core-2.11.8/LICENSE.md)
   * @standard-schema/spec@1.1.0 (licenses/@standard-schema__spec-1.1.0/LICENSE)
   * @tanstack/match-sorter-utils@8.19.4 (licenses/@tanstack__match-sorter-utils-8.19.4/LICENSE)
   * @tanstack/query-core@5.101.4 (licenses/@tanstack__query-core-5.101.4/LICENSE)
@@ -401,11 +379,8 @@
   * @tresjs/core@5.8.3 (licenses/@tresjs__core-5.8.3/LICENSE)
   * @types/draco3d@1.4.10 (licenses/@types__draco3d-1.4.10/LICENSE)
   * @types/json-schema@7.0.15 (licenses/@types__json-schema-7.0.15/LICENSE)
-  * @types/lodash@4.17.24 (licenses/@types__lodash-4.17.24/LICENSE)
-  * @types/lodash-es@4.17.12 (licenses/@types__lodash-es-4.17.12/LICENSE)
   * @types/offscreencanvas@2019.7.3 (licenses/@types__offscreencanvas-2019.7.3/LICENSE)
   * @types/trusted-types@2.0.7 (licenses/@types__trusted-types-2.0.7/LICENSE)
-  * @types/web-bluetooth@0.0.20 (licenses/@types__web-bluetooth-0.0.20/LICENSE)
   * @types/web-bluetooth@0.0.21 (licenses/@types__web-bluetooth-0.0.21/LICENSE)
   * @types/webxr@0.5.24 (licenses/@types__webxr-0.5.24/LICENSE)
   * @vue/compiler-core@3.5.40 (licenses/@vue__compiler-core-3.5.40/LICENSE)
@@ -421,26 +396,18 @@
   * @vue/runtime-dom@3.5.40 (licenses/@vue__runtime-dom-3.5.40/LICENSE)
   * @vue/server-renderer@3.5.40 (licenses/@vue__server-renderer-3.5.40/LICENSE)
   * @vue/shared@3.5.40 (licenses/@vue__shared-3.5.40/LICENSE)
-  * @vueuse/core@11.3.0 (licenses/@vueuse__core-11.3.0/LICENSE)
-  * @vueuse/core@14.3.0 (licenses/@vueuse__core-14.3.0/LICENSE)
   * @vueuse/core@14.4.0 (licenses/@vueuse__core-14.4.0/LICENSE)
-  * @vueuse/metadata@11.3.0 (licenses/@vueuse__metadata-11.3.0/LICENSE)
-  * @vueuse/metadata@14.3.0 (licenses/@vueuse__metadata-14.3.0/LICENSE)
   * @vueuse/metadata@14.4.0 (licenses/@vueuse__metadata-14.4.0/LICENSE)
-  * @vueuse/shared@11.3.0 (licenses/@vueuse__shared-11.3.0/LICENSE)
-  * @vueuse/shared@14.3.0 (licenses/@vueuse__shared-14.3.0/LICENSE)
   * @vueuse/shared@14.4.0 (licenses/@vueuse__shared-14.4.0/LICENSE)
   * abort-controller@3.0.0 (licenses/abort-controller-3.0.0/LICENSE)
   * abstract-logging@2.0.1
   * ajv@8.20.0 (licenses/ajv-8.20.0/LICENSE)
   * ajv-formats@3.0.1 (licenses/ajv-formats-3.0.1/LICENSE)
   * argon2@0.41.1 (licenses/argon2-0.41.1/LICENSE)
-  * async-validator@4.2.5 (licenses/async-validator-4.2.5/LICENSE.md)
   * atomic-sleep@1.0.0 (licenses/atomic-sleep-1.0.0/LICENSE)
   * avvio@9.3.0 (licenses/avvio-9.3.0/LICENSE)
   * balanced-match@4.0.4 (licenses/balanced-match-4.0.4/LICENSE.md)
   * base64-js@1.5.1 (licenses/base64-js-1.5.1/LICENSE)
-  * batch-processor@1.0.0 (licenses/batch-processor-1.0.0/LICENSE)
   * birpc@2.9.0 (licenses/birpc-2.9.0/LICENSE)
   * bowser@2.14.1 (licenses/bowser-2.14.1/LICENSE)
   * brace-expansion@5.0.9 (licenses/brace-expansion-5.0.9/LICENSE)
@@ -454,11 +421,8 @@
   * cookie@2.0.1 (licenses/cookie-2.0.1/LICENSE)
   * csstype@3.2.3 (licenses/csstype-3.2.3/LICENSE)
   * dateformat@4.6.3 (licenses/dateformat-4.6.3/LICENSE)
-  * dayjs@1.11.21 (licenses/dayjs-1.11.21/LICENSE)
   * depd@2.0.0 (licenses/depd-2.0.0/LICENSE)
   * dequal@2.0.3 (licenses/dequal-2.0.3/license)
-  * element-plus@2.14.3 (licenses/element-plus-2.14.3/LICENSE)
-  * element-resize-detector@1.2.4 (licenses/element-resize-detector-1.2.4/LICENSE)
   * end-of-stream@1.4.5 (licenses/end-of-stream-1.4.5/LICENSE)
   * escape-html@1.0.3 (licenses/escape-html-1.0.3/LICENSE)
   * estree-walker@2.0.2 (licenses/estree-walker-2.0.2/LICENSE)
@@ -476,8 +440,6 @@
   * fastify-plugin@6.0.0 (licenses/fastify-plugin-6.0.0/LICENSE)
   * fflate@0.6.11 (licenses/fflate-0.6.11/LICENSE)
   * find-my-way@9.7.0 (licenses/find-my-way-9.7.0/LICENSE)
-  * graphql@16.14.2 (licenses/graphql-16.14.2/LICENSE)
-  * graphql-request@7.4.0 (licenses/graphql-request-7.4.0/LICENSE)
   * help-me@5.0.0 (licenses/help-me-5.0.0/LICENSE)
   * hookable@5.5.3 (licenses/hookable-5.5.3/LICENSE.md)
   * http-errors@2.0.1 (licenses/http-errors-2.0.1/LICENSE)
@@ -490,18 +452,13 @@
   * json-schema-traverse@1.0.0 (licenses/json-schema-traverse-1.0.0/LICENSE)
   * langsmith@0.8.8
   * ldapts@8.2.0 (licenses/ldapts-8.2.0/LICENSE)
-  * lodash@4.18.1 (licenses/lodash-4.18.1/LICENSE)
-  * lodash-es@4.18.1 (licenses/lodash-es-4.18.1/LICENSE)
-  * lodash-unified@1.0.3
   * magic-string@0.30.21 (licenses/magic-string-0.30.21/LICENSE)
   * marked@14.0.0 (licenses/marked-14.0.0/LICENSE.md)
-  * memoize-one@6.0.0 (licenses/memoize-one-6.0.0/LICENSE)
   * mime@3.0.0 (licenses/mime-3.0.0/LICENSE)
   * minimist@1.2.8 (licenses/minimist-1.2.8/LICENSE)
-  * mitt@2.1.0
   * monaco-editor@0.55.1 (licenses/monaco-editor-0.55.1/LICENSE)
   * mustache@4.2.0 (licenses/mustache-4.2.0/LICENSE)
-  * nanoid@3.3.16 (licenses/nanoid-3.3.16/LICENSE)
+  * nanoid@3.3.18 (licenses/nanoid-3.3.18/LICENSE)
   * node-addon-api@8.9.0 (licenses/node-addon-api-8.9.0/LICENSE.md)
   * node-gyp-build@4.8.4 (licenses/node-gyp-build-4.8.4/LICENSE)
   * on-exit-leak-free@2.1.2 (licenses/on-exit-leak-free-2.1.2/LICENSE)
@@ -552,9 +509,7 @@
   * toad-cache@3.7.4 (licenses/toad-cache-3.7.4/LICENSE)
   * toidentifier@1.0.1 (licenses/toidentifier-1.0.1/LICENSE)
   * vue@3.5.40 (licenses/vue-3.5.40/LICENSE)
-  * vue-component-type-helpers@3.3.9 (licenses/vue-component-type-helpers-3.3.9/LICENSE)
   * vue-demi@0.14.10 (licenses/vue-demi-0.14.10/LICENSE)
-  * vue-grid-layout@3.0.0-beta1 (licenses/vue-grid-layout-3.0.0-beta1/LICENSE)
   * vue-i18n@10.0.8 (licenses/vue-i18n-10.0.8/LICENSE)
   * vue-router@4.6.4 (licenses/vue-router-4.6.4/LICENSE)
   * ws@8.21.1 (licenses/ws-8.21.1/LICENSE)
diff --git a/docs/access-control/audit-log.md b/docs/access-control/audit-log.md
index e8490f5..fea7c0e 100644
--- a/docs/access-control/audit-log.md
+++ b/docs/access-control/audit-log.md
@@ -16,7 +16,7 @@ Each event has these fields:
 | `outcome` | `success` / `ok` / `break-glass` for normal flows; the OAP `applyStatus` or `http_<code>` on an upstream failure. |
 | `details` | Extra context for the operation. |
 | `fromIp` | Requester IP. |
-| `sessionId` | Session id, when a session exists. |
+| `sessionId` | An opaque, non-replayable reference to the session, when one exists. Actions from the same session share the same value while the server is running, so a run of activity can be followed; it is a one-way digest, so it cannot be used to resume that session, and it does not match anything in a file written before a restart. |
 
 One event per line, `\n`-terminated. Use `jq -c` to filter:
 
diff --git a/docs/access-control/break-glass.md b/docs/access-control/break-glass.md
index dea6313..3ce44d4 100644
--- a/docs/access-control/break-glass.md
+++ b/docs/access-control/break-glass.md
@@ -59,7 +59,7 @@ Every successful break-glass login is recorded twice:
      "action": "auth.login.break-glass",
      "outcome": "break-glass",
      "fromIp": "192.0.2.10",
-     "sessionId": "...",
+     "sessionId": "...",   // opaque session reference, not a usable session id
      "details": { "backend": "ldap" }
    }
    ```
diff --git a/docs/changelog/1.0.0.md b/docs/changelog/1.0.0.md
index ccd3988..f6c0dfa 100644
--- a/docs/changelog/1.0.0.md
+++ b/docs/changelog/1.0.0.md
@@ -98,6 +98,13 @@
 - **A next-page read no longer risks skipping rows.** OAP derives a query's offset from its page size, so asking for "one row more" past the first page shifts the offset too and silently pages in the wrong stride. Horizon asks for the extra row only where that is exact, and everywhere else reads the next page's first row as a separate one-row probe carried in the same request against the same time window — so the page you see and the answer about what follows it always describe the same window.
 
 ### Deployment & configuration
+- **Horizon now sends a Content-Security-Policy, and it is strict where it counts.** Every response carries a policy that permits scripts only from Horizon's own origin and forbids inline script entirely — so a hostile string that reached an HTML sink or a link could not execute, and nothing can be fetched from, or leaked to, another origin. Images additionally allow `data:` (the icon set, the 3D map's baked glyphs and the editor's error underlines are built that way), and inline *styles [...]
+- **A layer's documentation link is restricted to real web addresses, and to hosts you trust.** The "docs ↗" link in a layer header comes from that layer's template, which is stored on OAP — a store that keeps it as an opaque string and can be written without going through Horizon. Anything that is not `http`, `https` or a path on this site is now refused outright, with the offending scheme named, both when a template is published and when one is read back. Which *hosts* it may point at  [...]
+- **Nothing the API returns is cached by the browser any more.** Every API response is now sent `no-store`, so metrics, traces, logs and your configuration are not written to the browser's cache or retained by a compliant intermediary — copies that would otherwise outlive the session allowed to see them, which matters most on a shared workstation. This covers HTTP caches; it does not change what the page holds in memory, nor the dashboard configuration the console deliberately keeps in b [...]
+- **The audit trail no longer records a session id you could log in with.** Each entry carried the raw session identifier — the same value as the session cookie — so anyone who could read the audit file, or the SIEM it was shipped to, could have replayed that session until it expired. Entries now carry a one-way correlation value instead: actions from one session still group together while you are reading the log, and the value is useless to anyone holding the file. Audit access is routi [...]
+- **The alarm-page and time defaults are held to the same limits the admin pages apply.** Publishing these settings now enforces the eight-layer pin cap, the three alarm-window choices, the 10–500 overview fetch range and a 31-day maximum default window — bounds the alarms configuration used to enforce before it moved to OAP, and which had been lost since. A value outside them is refused with the field named rather than stored and quietly ignored (or, for pinned layers, rendered as blank [...]
+- **Resetting the 3D Infrastructure Map to its shipped defaults works again.** "Push bundled" for the 3D-map configuration failed with a validation error, and a **Sync all** silently skipped that one row and reported it as failed — so the map could never be restored to, or seeded from, the configuration Horizon ships. The shipped file carries authoring notes (recording why four layers deliberately have no traffic metric) that its own validator counted as unknown fields and rejected. Anno [...]
+- **The alarm-page setup, the active theme and the global time default are validated before they are stored.** These three settings were the only configuration Horizon accepted without checking its shape: a malformed payload was written to OAP as-is and then served to every signed-in user, surfacing later as a page that would not render. They are now checked at the point of publishing, and a bad one is rejected with the field that is wrong — the same treatment dashboards and the 3D map a [...]
 - **Serving Horizon under a path prefix is a first-class build option now, and the docs say how.** Set `HORIZON_UI_BASE=/horizon/` when building from source and the prefix is baked into the artifact — page URLs, static assets and every API call resolve under it — for a reverse proxy that strips the same prefix before forwarding. Server Listener documents both halves and what each one looks like when only one of them is in place. Previously this needed a hand-passed build flag and the set [...]
 - **The runtime-rule dump download works under a path prefix.** Downloading a runtime-rule dump (all catalogs or one) was the single link in the app that ignored the deploy prefix: it aimed at the site root, so behind a gateway serving Horizon at `/horizon/` it hit whatever else owns `/api` there — usually a 404 instead of the archive. It now resolves against the same base as the rest of the UI.
 - **Running against an OAP whose template store Horizon cannot read? `templates.mode: readonly` is required.** In the default `live` mode Horizon renders only what is published to OAP, and an unreachable template store is a deliberate block: layer-driven pages stay empty behind the connectivity banner instead of quietly rendering a bundled copy that may not be what you published. The most visible casualty is **Traces**, which reads its query configuration from the layer template. That is [...]
diff --git a/docs/menu.yml b/docs/menu.yml
index 6a4508a..9cacd95 100644
--- a/docs/menu.yml
+++ b/docs/menu.yml
@@ -35,6 +35,8 @@ catalog:
         path: "/setup/rbac"
       - name: "Sessions"
         path: "/setup/session"
+      - name: "Security & Hardening"
+        path: "/setup/security"
       - name: "Audit Log File"
         path: "/setup/audit"
       - name: "Runtime State Files"
diff --git a/docs/setup/security.md b/docs/setup/security.md
new file mode 100644
index 0000000..9ff6ff2
--- /dev/null
+++ b/docs/setup/security.md
@@ -0,0 +1,71 @@
+# Security & Hardening
+
+What Horizon does on its own, what you configure, and what remains yours to do. Nothing on this page is required to get Horizon running — the defaults are the hardened ones — but an operator putting a console in front of a production backend should know where each line is drawn.
+
+## What is on by default
+
+**Browser hardening.** Every response carries a Content-Security-Policy. Scripts may load only from Horizon's own origin and inline script is forbidden outright, so a hostile string that reached the page could not run. Network requests, images, fonts and workers are likewise confined to Horizon's origin — nothing is fetched from, or can be sent to, another host. Framing is refused, so Horizon cannot be embedded in another page and used for clickjacking. This needs no configuration and ha [...]
+
+Two relaxations are deliberate and worth knowing about: images may additionally come from `data:` URLs, because the topology icon set, the 3D map's baked glyphs and the editor's error underlines are built that way; and inline *styles* are permitted, because the charting and editor libraries generate them. Neither grants script execution.
+
+**Session cookies** are `HttpOnly` and `SameSite=Strict`, so page script cannot read a session and another site cannot ride one. Set `session.cookieSecure` when you terminate TLS, which you should.
+
+**API responses are not kept by HTTP caches.** Everything Horizon's API returns — the metrics, traces and logs read from OAP, and your own configuration — is sent `no-store`, so neither the browser's own cache nor a compliant intermediary writes a copy. On a shared workstation such a copy would otherwise outlive the session that was allowed to see it. The console's own static files are content-hashed and stay cacheable; only the API is affected.
+
+This governs HTTP caches, and nothing else. It does not erase data the page already holds in memory, and it does not stop the application storing something deliberately — the console keeps its dashboard configuration in browser storage on purpose, so a returning operator gets an instant first paint. If you need a workstation to retain nothing at all, clear the site's data or use a private window.
+
+**The audit trail carries no replayable credential.** Entries record a one-way correlation value rather than the session identifier itself, so actions from one session still group together while you read the log, but the file cannot be used to resume anyone's session. This matters because audit logs are routinely shipped to a SIEM or attached to a ticket, where more people can read them than can read the session store.
+
+**Shipped assets are self-contained.** Horizon loads no fonts, scripts, styles or images from a third-party CDN — everything is packaged in the release. An air-gapped install needs no allow-listed egress for the console itself, and there is no third party who can change what your operators' browsers execute.
+
+## Outbound links from dashboards
+
+A layer's dashboard template may carry a documentation link, shown as **docs ↗** in the layer header. It is the only place a template can point somewhere outside Horizon, and it is governed two ways.
+
+**The scheme is not negotiable.** A link must be `http`, `https`, or a path on Horizon's own site. Anything else — `javascript:`, `data:`, and their variants — is refused when the template is published and again when it is read back, with the offending scheme named. A path that looks site-relative but actually resolves to another host is treated as what it is, not as what it is spelled like.
+
+**The hosts are yours to choose:**
+
+```yaml
+security:
+  trustedLinkDomains: ["skywalking.apache.org", "wiki.internal"]
+```
+
+A listed host matches itself and its subdomains, so `wiki.internal` also covers `docs.wiki.internal`. Values are bare hostnames — no scheme, port, path or wildcard; Horizon refuses to start on anything else rather than accept a value that could never match.
+
+The default is `["skywalking.apache.org"]`, because every dashboard Horizon ships links to the project documentation. It is a default, not a built-in exemption:
+
+```yaml
+security:
+  trustedLinkDomains: []
+```
+
+With an empty list no outbound link renders at all — a fully closed console. Links to a host outside the list are simply not shown, and the reason is written to the server log.
+
+Both checks run when a template is published **and** when one is read. That second pass is not redundant: dashboard templates live in OAP, which stores them as opaque text and can be written by anything with access to it, so a template need not have passed through Horizon at all.
+
+## Set by the environment variable
+
+| Setting | Environment variable | Default |
+|---|---|---|
+| `security.trustedLinkDomains` | `HORIZON_TRUSTED_LINK_DOMAINS` | `["skywalking.apache.org"]` |
+
+As with every list-valued setting, the environment form is a single-line JSON string:
+
+```
+HORIZON_TRUSTED_LINK_DOMAINS='["wiki.internal"]'
+```
+
+## What is still yours to do
+
+**Terminate TLS in front of Horizon** and set `session.cookieSecure`. Horizon does not serve HTTPS itself.
+
+**Restrict who can reach OAP.** Horizon's protections apply to Horizon. OAP's own ports — the query API and, on 11.x, the admin surface that stores dashboard templates — have no authentication of their own, and anything that can write the template store can change what your operators see. Keep those ports on a trusted network.
+
+**Rate-limit the login endpoint at your ingress.** Horizon does not throttle failed sign-ins or bound how long a submitted username and password may be, so a determined client can attempt passwords as fast as it can open connections, and each attempt costs a password-hash verification or an LDAP round trip. If Horizon is reachable from anywhere untrusted, put a rate limit in front of it. Configure your proxy to pass the real client address so that limit applies per client rather than per proxy.
+
+**Review who holds write permissions.** Anyone who can edit dashboards can change every metric expression an operator reads, and anyone who can edit templates can change where the documentation link points within your allow-list. See [Access Control](/setup/rbac).
+
+## Reporting a vulnerability
+
+Horizon is part of Apache SkyWalking. Report suspected vulnerabilities to the ASF security team as described at [apache.org/security](https://www.apache.org/security/) — not in a public issue.
diff --git a/horizon.yaml b/horizon.yaml
index 5670acb..6c64f10 100644
--- a/horizon.yaml
+++ b/horizon.yaml
@@ -50,6 +50,23 @@ templates:
   # still used either way. (Changing this mode needs a BFF restart.)
   mode: "${HORIZON_TEMPLATES_MODE:live}"
 
+security:
+  # Hosts a dashboard template's outbound link may point at. The only
+  # operator-supplied link in the product is a layer template's
+  # `documentLink` — the "docs ↗" anchor in the layer header — and it may
+  # only leave this origin for a host listed here. A host matches itself and
+  # its subdomains.
+  #
+  # The default is the project's own documentation domain, because every
+  # bundled layer template links there. It is a default, not a built-in
+  # exemption: set this to `[]` for a fully closed console and no outbound
+  # link renders at all. Add your internal wiki to keep its links working.
+  #
+  # A site-relative link (`/runbook/kafka`) never needs listing — it does not
+  # leave the origin. Non-http(s) schemes (`javascript:`, `data:`, …) are
+  # always refused and that is not configurable.
+  trustedLinkDomains: ${HORIZON_TRUSTED_LINK_DOMAINS:["skywalking.apache.org"]}
+
 oap:
   # OAP query host (GraphQL + /status/*; default port 12800).
   queryUrl: "${HORIZON_OAP_QUERY_URL:http://127.0.0.1:12800}"
diff --git a/package.json b/package.json
index f935618..b8b424e 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
   "license": "Apache-2.0",
   "type": "module",
   "engines": {
-    "node": ">=22"
+    "node": ">=24"
   },
   "packageManager": "pnpm@10.33.2",
   "scripts": {
@@ -15,10 +15,11 @@
     "dev:bff": "pnpm --filter @skywalking-horizon-ui/bff dev",
     "build": "pnpm -r run build",
     "type-check": "pnpm -r run type-check",
-    "lint": "pnpm -r run lint && node scripts/check-source-budget.mjs && node scripts/check-ui-i18n.mjs && node scripts/check-ui-promises.mjs && pnpm --filter @skywalking-horizon-ui/bff run i18n:validate && pnpm --filter @skywalking-horizon-ui/bff run templates:validate",
+    "lint": "pnpm -r run lint && node scripts/check-source-budget.mjs && node scripts/check-ui-i18n.mjs && node scripts/check-ui-promises.mjs && node scripts/check-unused-deps.mjs && node scripts/check-security.mjs && node scripts/check-security-selftest.mjs && pnpm --filter @skywalking-horizon-ui/bff run i18n:validate && pnpm --filter @skywalking-horizon-ui/bff run templates:validate",
     "lint:budget": "node scripts/check-source-budget.mjs",
     "lint:i18n": "node scripts/check-ui-i18n.mjs && pnpm --filter @skywalking-horizon-ui/bff run i18n:validate",
     "lint:promises": "node scripts/check-ui-promises.mjs",
+    "lint:security": "node scripts/check-security.mjs && node scripts/check-security-selftest.mjs",
     "lint:templates": "pnpm --filter @skywalking-horizon-ui/bff run templates:validate",
     "test:unit": "pnpm -r run test:unit",
     "license:check": "license-eye -c .licenserc.yaml header check",
@@ -26,7 +27,8 @@
     "licenses:bin:update": "node scripts/collect-dist-licenses.mjs --update-reference",
     "licenses:bin:check": "node scripts/collect-dist-licenses.mjs --check && node scripts/check-dist-licenses.mjs",
     "package": "node scripts/package.mjs",
-    "start": "HORIZON_CONFIG=${HORIZON_CONFIG:-./horizon.yaml} node dist/server.js"
+    "start": "HORIZON_CONFIG=${HORIZON_CONFIG:-./horizon.yaml} node dist/server.js",
+    "lint:deps": "node scripts/check-unused-deps.mjs"
   },
   "devDependencies": {
     "typescript": "~5.6.3",
@@ -40,7 +42,7 @@
       "vue-demi"
     ],
     "overrides": {
-      "dompurify@<3.3.2": ">=3.3.2",
+      "dompurify@<3.4.13": ">=3.4.13",
       "js-cookie@<3.0.7": ">=3.0.7",
       "ws@>=8.0.0 <8.20.1": ">=8.20.1",
       "esbuild@<0.25.0": ">=0.25.0",
diff --git a/packages/templates/package.json b/packages/templates/package.json
deleted file mode 100644
index b195ccc..0000000
--- a/packages/templates/package.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-  "name": "@skywalking-horizon-ui/templates",
-  "version": "1.0.0-dev",
-  "private": true,
-  "type": "module",
-  "main": "./dist/index.js",
-  "types": "./dist/index.d.ts",
-  "exports": {
-    ".": {
-      "types": "./dist/index.d.ts",
-      "import": "./dist/index.js"
-    }
-  },
-  "files": [
-    "dist"
-  ],
-  "scripts": {
-    "build": "tsc -p tsconfig.build.json",
-    "clean": "rm -rf dist",
-    "prepare": "tsc -p tsconfig.build.json",
-    "type-check": "tsc --noEmit"
-  },
-  "devDependencies": {
-    "typescript": "~5.6.3"
-  }
-}
diff --git a/packages/templates/src/index.ts b/packages/templates/src/index.ts
deleted file mode 100644
index a981002..0000000
--- a/packages/templates/src/index.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Horizon-native template format will be designed against the new visual
-// spec, not carried forward from booster-ui / ui-initialized-templates.
-// The upstream bundle is kept locally under `docs/design/research/` as a
-// learning reference only — never imported at runtime.
-export {};
diff --git a/packages/templates/tsconfig.build.json b/packages/templates/tsconfig.build.json
deleted file mode 100644
index e29ab80..0000000
--- a/packages/templates/tsconfig.build.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "extends": "../../tsconfig.base.json",
-  "compilerOptions": {
-    "baseUrl": ".",
-    "rootDir": "src",
-    "outDir": "dist",
-    "noEmit": false,
-    "declaration": true,
-    "declarationMap": true,
-    "sourceMap": true,
-    "module": "NodeNext",
-    "moduleResolution": "NodeNext"
-  },
-  "include": ["src/**/*"],
-  "exclude": ["dist", "node_modules"]
-}
diff --git a/packages/templates/tsconfig.json b/packages/templates/tsconfig.json
deleted file mode 100644
index ce46ce9..0000000
--- a/packages/templates/tsconfig.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "extends": "../../tsconfig.base.json",
-  "compilerOptions": {
-    "baseUrl": ".",
-    "rootDir": "src",
-    "noEmit": true
-  },
-  "include": ["src/**/*"]
-}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b9259ee..7390338 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5,7 +5,7 @@ settings:
   excludeLinksFromLockfile: false
 
 overrides:
-  dompurify@<3.3.2: '>=3.3.2'
+  dompurify@<3.4.13: '>=3.4.13'
   js-cookie@<3.0.7: '>=3.0.7'
   ws@>=8.0.0 <8.20.1: '>=8.20.1'
   esbuild@<0.25.0: '>=0.25.0'
@@ -125,9 +125,6 @@ importers:
       '@skywalking-horizon-ui/design-tokens':
         specifier: workspace:*
         version: link:../../packages/design-tokens
-      '@skywalking-horizon-ui/templates':
-        specifier: workspace:*
-        version: link:../../packages/templates
       '@tanstack/vue-query':
         specifier: ^5.101.4
         version: 5.101.4(vue@3.5.40(typescript@5.6.3))
@@ -137,9 +134,6 @@ importers:
       '@tresjs/core':
         specifier: ^5.8.3
         version: 5.8.3(three@0.184.0)(vue@3.5.40(typescript@5.6.3))
-      '@vueuse/core':
-        specifier: ^11.3.0
-        version: 11.3.0(vue@3.5.40(typescript@5.6.3))
       d3:
         specifier: ^7.9.0
         version: 7.9.0
@@ -149,15 +143,6 @@ importers:
       echarts:
         specifier: ^6.1.0
         version: 6.1.0
-      element-plus:
-        specifier: ^2.14.3
-        version: 2.14.3(vue@3.5.40(typescript@5.6.3))
-      graphql:
-        specifier: ^16.14.2
-        version: 16.14.2
-      graphql-request:
-        specifier: ^7.4.0
-        version: 7.4.0(graphql@16.14.2)
       monaco-editor:
         specifier: ^0.55.1
         version: 0.55.1
@@ -170,9 +155,6 @@ importers:
       vue:
         specifier: ^3.5.40
         version: 3.5.40(typescript@5.6.3)
-      vue-grid-layout:
-        specifier: 3.0.0-beta1
-        version: 3.0.0-beta1(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)(typescript@5.6.3)
       vue-i18n:
         specifier: ^10.0.8
         version: 10.0.8(vue@3.5.40(typescript@5.6.3))
@@ -253,12 +235,6 @@ importers:
         specifier: ~5.6.3
         version: 5.6.3
 
-  packages/templates:
-    devDependencies:
-      typescript:
-        specifier: ~5.6.3
-        version: 5.6.3
-
   test/e2e/playwright:
     devDependencies:
       '@playwright/test':
@@ -508,18 +484,9 @@ packages:
     resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==}
     engines: {node: '>=18'}
 
-  '@ctrl/tinycolor@4.2.0':
-    resolution: {integrity: sha512-kzyuwOAQnXJNLS9PSyrk0CWk35nWJW/zl/6KvnTBMFK65gm7U1/Z5BqjxeapjZCIhQcM/DsrEmcbRwDyXyXK4A==}
-    engines: {node: '>=14'}
-
   '@dimforge/rapier3d-compat@0.12.0':
     resolution: {integrity: sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==}
 
-  '@element-plus/icons-vue@2.3.2':
-    resolution: {integrity: sha512-OzIuTaIfC8QXEPmJvB4Y4kw34rSXdCJzxcD1kFStBvr8bK6X1zQAYDo0CNMjojnfTqRQCJ0I7prlErcoRiET2A==}
-    peerDependencies:
-      vue: ^3.2.0
-
   '@esbuild/aix-ppc64@0.25.12':
     resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==}
     engines: {node: '>=18'}
@@ -909,26 +876,12 @@ packages:
   '@fastify/static@10.1.2':
     resolution: {integrity: sha512-G/g18cG9tLutT/OVyN1AIsHIl9L1UwmJ+S3dkyhVpplIx0nEMicd7RGQ+uJLyhKKF4a3tTcQydccn3Mop1fX+Q==}
 
-  '@floating-ui/core@1.8.0':
-    resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==}
-
-  '@floating-ui/dom@1.8.0':
-    resolution: {integrity: sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==}
-
-  '@floating-ui/utils@0.2.12':
-    resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==}
-
   '@fontsource-variable/inter@5.3.0':
     resolution: {integrity: sha512-OupL48va4JNofb97w6NYeF9S7W/kHNKM0Er8Dem5nqi4jeOLrVJDoE8tZEpnMJmtkvNbB1EIPPwHcdkF6b1oUA==}
 
   '@fontsource-variable/jetbrains-mono@5.3.0':
     resolution: {integrity: sha512-F32xpS2NsGYoQi2ADSkKTgpJj7ozajsGgDJ8woTnqjmIB+dxDIqImjl4pXZVEExu8UFZ2ndhmX18EBS/hdz3Lw==}
 
-  '@graphql-typed-document-node/core@3.2.0':
-    resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==}
-    peerDependencies:
-      graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
-
   '@humanfs/core@0.19.2':
     resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==}
     engines: {node: '>=18.18.0'}
@@ -949,79 +902,6 @@ packages:
     resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
     engines: {node: '>=18.18'}
 
-  '@interactjs/actions@1.10.27':
-    resolution: {integrity: sha512-FCRg5KwB+stkPcAMx/Cn0fgGP6p4LyMX9S/Upcn/W+hpYme31bPi54PCqmOebzz6myTthN6zFf9jMyLOqtI/gg==}
-    peerDependencies:
-      '@interactjs/core': 1.10.27
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/auto-scroll@1.10.27':
-    resolution: {integrity: sha512-zPg5TnVsZv+9Hnt4qnbxLvBMf+rIWHkoJVoSETEbLNaj90C8hIyr0pVwukSUySSgDhCgQ7np0f3pg4INLq9beQ==}
-    peerDependencies:
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/auto-start@1.10.27':
-    resolution: {integrity: sha512-ECLBO/nxmaF1knncJKIE5F7la3KKRgEkn0Cu2JTPOYj9xy/LpfYElo3wkRHsodgOqF651nR70GK2/IzPR2lO9A==}
-    peerDependencies:
-      '@interactjs/core': 1.10.27
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/core@1.10.27':
-    resolution: {integrity: sha512-SliUr/3ZbLAdED8LokzYzWHWMdCB5Cq+UnpXuRy+BIod1j97m4IUFf/D1iIKUBBjBcucgXbz28z96WnenVCB7Q==}
-    peerDependencies:
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/dev-tools@1.10.27':
-    resolution: {integrity: sha512-YolmBwRaKH1gWbvyLeV3m5QSwtD38lOZnCBA87PCAlcd9PQAC2gb03fEPeEyD336bE20oLB8f0WZt4Wre+afiw==}
-    peerDependencies:
-      '@interactjs/modifiers': 1.10.27
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/inertia@1.10.27':
-    resolution: {integrity: sha512-S/SVj/M0D+wWWPVXHcXN/YUWOK51LFJsEA+CTgVnFhlSU04+1FUvNLwilCZcHgECu1RJxZNKDwZysDATg+r8jQ==}
-    peerDependencies:
-      '@interactjs/core': 1.10.27
-      '@interactjs/modifiers': 1.10.27
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/interact@1.10.27':
-    resolution: {integrity: sha512-XdH3A2UUzjEFGGJgFuJlhiz99tE8jB8xNh/DmnoMuL6uOQPxNA+sWRnzEVjG0+zY2P3/dbhEpi4Cn3FLPzydwA==}
-
-  '@interactjs/interactjs@1.10.27':
-    resolution: {integrity: sha512-UwhfUZMZVXUY72efPABuKSBz1sUY+r+49v8t6Ku9o5Jq76AKg9mwmdGszIlOn3ppnFDDjvtzK/8TL+Sbd0EQEA==}
-
-  '@interactjs/modifiers@1.10.27':
-    resolution: {integrity: sha512-ei/qfoQ+9/8k6WzNzdNqHI6cWkIV576N4Ap16r5CoqOWwhA6Xzj3OMHf1g0t1O4eSq2HdJsVJn3eLNfw9HsbeQ==}
-    peerDependencies:
-      '@interactjs/core': 1.10.27
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/offset@1.10.27':
-    resolution: {integrity: sha512-AezsLiuK+Qv4jXdYuRa65HJ2pMFMZPlqiAep6ZRLwhP9HE7O75c0EAm+gfx+dpPrHNHs6J9LaiKSZl+B+A2qAw==}
-    peerDependencies:
-      '@interactjs/core': 1.10.27
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/pointer-events@1.10.27':
-    resolution: {integrity: sha512-Yo5SS6PhWfC93gHNxnwwW0wvebo5hSYJKGaSnAHO4f9Lh25yibecMnmPBmiEfWVcdMboK/kXrme43mHQaRegVg==}
-    peerDependencies:
-      '@interactjs/core': 1.10.27
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/reflow@1.10.27':
-    resolution: {integrity: sha512-Msm0QdYFr40oSsPFxyCR3dHN/pQx34k7QSkdN1uIsUn/drrm+YSFvrvVOu99DFOwr7gTThr5vNe06Sz4vubTSA==}
-    peerDependencies:
-      '@interactjs/core': 1.10.27
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/snappers@1.10.27':
-    resolution: {integrity: sha512-HZLZ0XSi6HI08OmTv/HKG6AltQoaKAALLQ+KDW92utj3XSgw7oren0KsWUKPhaPg3Av7R1jFQd08s+uafqIlLw==}
-    peerDependencies:
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/utils@1.10.27':
-    resolution: {integrity: sha512-+qfLOio2OxQqg1cXSnRaCl+N8MQDQLDS9w+aOGxH8YLAhIMyt7Asxx/46//sT8orgsi16pmlBPtngPHT9s8zKw==}
-
   '@intlify/core-base@10.0.8':
     resolution: {integrity: sha512-FoHslNWSoHjdUBLy35bpm9PV/0LVI/DSv9L6Km6J2ad8r/mm0VaGg06C40FqlE8u2ADcGUM60lyoU7Myo4WNZQ==}
     engines: {node: '>= 16'}
@@ -1396,9 +1276,6 @@ packages:
   '@standard-schema/spec@1.1.0':
     resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==}
 
-  '@sxzz/popperjs-es@2.11.8':
-    resolution: {integrity: sha512-wOwESXvvED3S8xBmcPWHs2dUuzrE4XiZeFu7e1hROIJkm02a49N120pmOXxY33sBb6hArItm5W5tcg1cBtV+HQ==}
-
   '@tanstack/match-sorter-utils@8.19.4':
     resolution: {integrity: sha512-Wo1iKt2b9OT7d+YGhvEPD3DXvPv2etTusIMhMUoG7fbhmxcXCtIjJDEygy91Y2JFlwGyjqiBPRozme7UD8hoqg==}
     engines: {node: '>=12'}
@@ -1545,12 +1422,6 @@ packages:
   '@types/json-schema@7.0.15':
     resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
 
-  '@types/lodash-es@4.17.12':
-    resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==}
-
-  '@types/lodash@4.17.24':
-    resolution: {integrity: sha512-gIW7lQLZbue7lRSWEFql49QJJWThrTFFeIMJdp3eH4tKoxm1OvEPg02rm4wCCSHS0cL3/Fizimb35b7k8atwsQ==}
-
   '@types/node@22.20.1':
     resolution: {integrity: sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==}
 
@@ -1566,9 +1437,6 @@ packages:
   '@types/trusted-types@2.0.7':
     resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}
 
-  '@types/web-bluetooth@0.0.20':
-    resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
-
   '@types/web-bluetooth@0.0.21':
     resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==}
 
@@ -1783,36 +1651,14 @@ packages:
   '@vue/tsconfig@0.5.1':
     resolution: {integrity: sha512-VcZK7MvpjuTPx2w6blwnwZAu5/LgBUtejFOi3pPGQFXQN5Ela03FUtd2Qtg4yWGGissVL0dr6Ro1LfOFh+PCuQ==}
 
-  '@vueuse/core@11.3.0':
-    resolution: {integrity: sha512-7OC4Rl1f9G8IT6rUfi9JrKiXy4bfmHhZ5x2Ceojy0jnd3mHNEvV4JaRygH362ror6/NZ+Nl+n13LPzGiPN8cKA==}
-
-  '@vueuse/core@14.3.0':
-    resolution: {integrity: sha512-aHfz47g0ZhMtTVHmIzMVpJy8ePhhOy68GY5bv110+5DVtZ+W7BsOx+m61UNQqfrWyPztIHIanWa3E2tib3NFIw==}
-    peerDependencies:
-      vue: ^3.5.0
-
   '@vueuse/core@14.4.0':
     resolution: {integrity: sha512-X4WHz1HlCzCBoYXesUkifzzWBAcZgXG8Fi5iNPQg/epdzOB3gu8Fawj3hvuwYR1nGcXGnvxwYYcUC/71++svtQ==}
     peerDependencies:
       vue: ^3.5.0
 
-  '@vueuse/metadata@11.3.0':
-    resolution: {integrity: sha512-pwDnDspTqtTo2HwfLw4Rp6yywuuBdYnPYDq+mO38ZYKGebCUQC/nVj/PXSiK9HX5otxLz8Fn7ECPbjiRz2CC3g==}
-
-  '@vueuse/metadata@14.3.0':
-    resolution: {integrity: sha512-BwxmbAzwAVF50+MW57GXOUEV61nFBGnlBvrTqj49PqWJu3uw7hdu72ztXeZ33RdZtDY6kO+bfCAE1PCn88Tktw==}
-
   '@vueuse/metadata@14.4.0':
     resolution: {integrity: sha512-swx/255R6JyHZFJhx845iz5CRWDZdCfvkZOpACWc5+c5WHcG24mv8gUT1WIdFQaHt6dq79rvILd9QnCWiyVm9g==}
 
-  '@vueuse/shared@11.3.0':
-    resolution: {integrity: sha512-P8gSSWQeucH5821ek2mn/ciCk+MS/zoRKqdQIM3bHq6p7GXDAJLmnRRKmF5F65sAVJIfzQlwR3aDzwCn10s8hA==}
-
-  '@vueuse/shared@14.3.0':
-    resolution: {integrity: sha512-bZpge9eSXwa4ToSiqJ7j6KRwhAsneMFoSz3LMWKQDkqimm3D/tbFlrklrs/IOqC8tEcYmXQZJ6N0UrjhBirVCg==}
-    peerDependencies:
-      vue: ^3.5.0
-
   '@vueuse/shared@14.4.0':
     resolution: {integrity: sha512-JRgY90Sz8DDtPMsaDflvPMp9xYk69JZAmbuDvAquUVXKr2gEjqtzGNTTthLfckH0BzBqvnu31gb4a8TGLRe79g==}
     peerDependencies:
@@ -1903,9 +1749,6 @@ packages:
     resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==}
     engines: {node: '>= 0.4'}
 
-  async-validator@4.2.5:
-    resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==}
-
   asynckit@0.4.0:
     resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
 
@@ -1935,9 +1778,6 @@ packages:
     engines: {node: '>=6.0.0'}
     hasBin: true
 
-  batch-processor@1.0.0:
-    resolution: {integrity: sha512-xoLQD8gmmR32MeuBHgH0Tzd5PuSZx71ZsbhVxOCRbgktZEPe4SQy7s9Z50uPp0F/f7iw2XmkHN2xkgbMfckMDA==}
-
   birpc@2.9.0:
     resolution: {integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==}
 
@@ -2232,9 +2072,6 @@ packages:
   dateformat@4.6.3:
     resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==}
 
-  dayjs@1.11.21:
-    resolution: {integrity: sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==}
-
   de-indent@1.0.2:
     resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==}
 
@@ -2280,8 +2117,8 @@ packages:
     resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}
     engines: {node: '>=8'}
 
-  dompurify@3.4.12:
-    resolution: {integrity: sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==}
+  dompurify@3.4.13:
+    resolution: {integrity: sha512-2vmYIoqjze2d+kakP8S/nS5shfsl587kzwEjcGlTdiksUVgFHnFCsLYDVj/JNqJVOQZGSYBTmuycv0PodwmnMQ==}
 
   draco3d@1.5.7:
     resolution: {integrity: sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==}
@@ -2304,14 +2141,6 @@ packages:
   electron-to-chromium@1.5.399:
     resolution: {integrity: sha512-lEcqhErbHjXRvd41rnWLpzbyU/IXfIYo7QwaFWmxGeLiLyY2TBCdHnWY88vB+p3ubnihRypDm66panXl7TylLA==}
 
-  element-plus@2.14.3:
-    resolution: {integrity: sha512-pJcvxcpZjYruNzuJhAeVwnbYjfNgzBKnWHwSVEhwzM2/kcLI3brzmtIBxtPqd4hQWJfD1PRnjoc1WipLw2eBGg==}
-    peerDependencies:
-      vue: ^3.3.7
-
-  element-resize-detector@1.2.4:
-    resolution: {integrity: sha512-Fl5Ftk6WwXE0wqCgNoseKWndjzZlDCwuPTcoVZfCP9R3EHQF8qUtr3YUPNETegRBOKqQKPW3n4kiIWngGi8tKg==}
-
   emoji-regex@8.0.0:
     resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
 
@@ -2531,11 +2360,11 @@ packages:
   fast-safe-stringify@2.1.1:
     resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==}
 
-  fast-uri@3.1.4:
-    resolution: {integrity: sha512-8JnbkQ4juDyvYs4mgFGQqg4yCYtFDtUtmp2QIQq11ZZe5CFQ5wcqm1rqDgAh/QdMySuBnPzMUiJUNZG5N/AiQw==}
+  fast-uri@3.1.5:
+    resolution: {integrity: sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==}
 
-  fast-uri@4.1.1:
-    resolution: {integrity: sha512-YPOs1zD5TG2+EZt+r88LwF6mclA7TPkpwMP7ZN3TO2HiHS8TXvq7QA/17iJsV9dubcLo/f8eEYqMBruyQV21hQ==}
+  fast-uri@4.1.2:
+    resolution: {integrity: sha512-TyGmBcbDTZXcb2cj5MV89DrF42DKvb3y5DDUNh95iO+IMeAzMkVSxK1PZRrRIpc9yg8U2GhGdbofNa0LS/a4Bw==}
 
   fastify-plugin@6.0.0:
     resolution: {integrity: sha512-fZOty7z3O7vOliF6d8bHE3wiEh1KcNnKEQensSgTk9C1DvN6nRLS++XVd86v33Hw/8u9Un8A1zDrQ8ujcQDHEg==}
@@ -2672,15 +2501,6 @@ packages:
   graceful-fs@4.2.11:
     resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
 
-  graphql-request@7.4.0:
-    resolution: {integrity: sha512-xfr+zFb/QYbs4l4ty0dltqiXIp07U6sl+tOKAb0t50/EnQek6CVVBLjETXi+FghElytvgaAWtIOt3EV7zLzIAQ==}
-    peerDependencies:
-      graphql: 14 - 16
-
-  graphql@16.14.2:
-    resolution: {integrity: sha512-Chq1s4CY7jmh8gO2qvLIJyfCDIN+EHLFW/9iShnp1z8FjBQMoodWP1kDC36VAMXXIvAjj4ARa7ntfAV2BrjsbA==}
-    engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0}
-
   has-bigints@1.1.0:
     resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==}
     engines: {node: '>= 0.4'}
@@ -2930,8 +2750,8 @@ packages:
   js-tokens@4.0.0:
     resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
 
-  js-yaml@4.3.0:
-    resolution: {integrity: sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==}
+  js-yaml@4.3.1:
+    resolution: {integrity: sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==}
     hasBin: true
 
   jsdom@25.0.1:
@@ -3013,16 +2833,6 @@ packages:
     resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
     engines: {node: '>=10'}
 
-  lodash-es@4.18.1:
-    resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==}
-
-  lodash-unified@1.0.3:
-    resolution: {integrity: sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==}
-    peerDependencies:
-      '@types/lodash-es': '*'
-      lodash: '*'
-      lodash-es: '*'
-
   lodash.merge@4.6.2:
     resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
 
@@ -3051,9 +2861,6 @@ packages:
     resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
     engines: {node: '>= 0.4'}
 
-  memoize-one@6.0.0:
-    resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
-
   memorystream@0.3.1:
     resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==}
     engines: {node: '>= 0.10.0'}
@@ -3100,9 +2907,6 @@ packages:
     resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==}
     engines: {node: '>=16 || 14 >=14.17'}
 
-  mitt@2.1.0:
-    resolution: {integrity: sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==}
-
   monaco-editor@0.55.1:
     resolution: {integrity: sha512-jz4x+TJNFHwHtwuV9vA9rMujcZRb0CEilTEwG2rRSpe/A7Jdkuj8xPKttCgOh+v/lkHy7HsZ64oj+q3xoAFl9A==}
 
@@ -3116,8 +2920,8 @@ packages:
     resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==}
     hasBin: true
 
-  nanoid@3.3.16:
-    resolution: {integrity: sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==}
+  nanoid@3.3.18:
+    resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==}
     engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
     hasBin: true
 
@@ -3150,9 +2954,6 @@ packages:
   normalize-package-data@2.5.0:
     resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==}
 
-  normalize-wheel-es@1.2.0:
-    resolution: {integrity: sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==}
-
   npm-run-all@4.1.5:
     resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==}
     engines: {node: '>= 4'}
@@ -3974,9 +3775,6 @@ packages:
     peerDependencies:
       eslint: '>=6.0.0'
 
-  vue-grid-layout@3.0.0-beta1:
-    resolution: {integrity: sha512-MsW0yfYNtnAO/uDhfZvkP6effxSJxvhAFbIL37x6Rn3vW9xf0WHVefKaSbQMLpSq3mXnR6ut0pg2Cd5lqIIZzg==}
-
   vue-i18n@10.0.8:
     resolution: {integrity: sha512-mIjy4utxMz9lMMo6G9vYePv7gUFt4ztOMhY9/4czDJxZ26xPeJ49MAGa9wBAE3XuXbYCrtVPmPxNjej7JJJkZQ==}
     engines: {node: '>= 16'}
@@ -4504,14 +4302,8 @@ snapshots:
 
   '@csstools/css-tokenizer@3.0.4': {}
 
-  '@ctrl/tinycolor@4.2.0': {}
-
   '@dimforge/rapier3d-compat@0.12.0': {}
 
-  '@element-plus/icons-vue@2.3.2(vue@3.5.40(typescript@5.6.3))':
-    dependencies:
-      vue: 3.5.40(typescript@5.6.3)
-
   '@esbuild/aix-ppc64@0.25.12':
     optional: true
 
@@ -4699,7 +4491,7 @@ snapshots:
       globals: 14.0.0
       ignore: 5.3.2
       import-fresh: 3.3.1
-      js-yaml: 4.3.0
+      js-yaml: 4.3.1
       minimatch: 3.1.5
       strip-json-comments: 3.1.1
     transitivePeerDependencies:
@@ -4720,7 +4512,7 @@ snapshots:
     dependencies:
       ajv: 8.20.0
       ajv-formats: 3.0.1(ajv@8.20.0)
-      fast-uri: 3.1.4
+      fast-uri: 3.1.5
 
   '@fastify/busboy@3.2.0': {}
 
@@ -4774,25 +4566,10 @@ snapshots:
       fastq: 1.20.1
       glob: 13.0.6
 
-  '@floating-ui/core@1.8.0':
-    dependencies:
-      '@floating-ui/utils': 0.2.12
-
-  '@floating-ui/dom@1.8.0':
-    dependencies:
-      '@floating-ui/core': 1.8.0
-      '@floating-ui/utils': 0.2.12
-
-  '@floating-ui/utils@0.2.12': {}
-
   '@fontsource-variable/inter@5.3.0': {}
 
   '@fontsource-variable/jetbrains-mono@5.3.0': {}
 
-  '@graphql-typed-document-node/core@3.2.0(graphql@16.14.2)':
-    dependencies:
-      graphql: 16.14.2
-
   '@humanfs/core@0.19.2':
     dependencies:
       '@humanfs/types': 0.15.0
@@ -4809,108 +4586,6 @@ snapshots:
 
   '@humanwhocodes/retry@0.4.3': {}
 
-  '@interactjs/actions@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/core': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-
-  '@interactjs/auto-scroll@1.10.27(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-
-  '@interactjs/auto-start@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/core': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-
-  '@interactjs/core@1.10.27(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/dev-tools@1.10.27(@interactjs/modifiers@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)(typescript@5.6.3)':
-    dependencies:
-      '@interactjs/modifiers': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-      vue: 3.5.40(typescript@5.6.3)
-    transitivePeerDependencies:
-      - typescript
-
-  '@interactjs/inertia@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/modifiers@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/core': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/modifiers': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/offset': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-
-  '@interactjs/interact@1.10.27':
-    dependencies:
-      '@interactjs/core': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-
-  '@interactjs/interactjs@1.10.27(typescript@5.6.3)':
-    dependencies:
-      '@interactjs/actions': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/auto-scroll': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/auto-start': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/core': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/dev-tools': 1.10.27(@interactjs/modifiers@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)(typescript@5.6.3)
-      '@interactjs/inertia': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/modifiers@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/interact': 1.10.27
-      '@interactjs/modifiers': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/offset': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/pointer-events': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/reflow': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-    transitivePeerDependencies:
-      - typescript
-
-  '@interactjs/modifiers@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/core': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/snappers': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-
-  '@interactjs/offset@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/core': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-
-  '@interactjs/pointer-events@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/core': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-
-  '@interactjs/reflow@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/core': 1.10.27(@interactjs/utils@1.10.27)
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-
-  '@interactjs/snappers@1.10.27(@interactjs/utils@1.10.27)':
-    dependencies:
-      '@interactjs/utils': 1.10.27
-    optionalDependencies:
-      '@interactjs/interact': 1.10.27
-
-  '@interactjs/utils@1.10.27': {}
-
   '@intlify/core-base@10.0.8':
     dependencies:
       '@intlify/message-compiler': 10.0.8
@@ -5217,8 +4892,6 @@ snapshots:
 
   '@standard-schema/spec@1.1.0': {}
 
-  '@sxzz/popperjs-es@2.11.8': {}
-
   '@tanstack/match-sorter-utils@8.19.4':
     dependencies:
       remove-accents: 0.5.0
@@ -5394,12 +5067,6 @@ snapshots:
 
   '@types/json-schema@7.0.15': {}
 
-  '@types/lodash-es@4.17.12':
-    dependencies:
-      '@types/lodash': 4.17.24
-
-  '@types/lodash@4.17.24': {}
-
   '@types/node@22.20.1':
     dependencies:
       undici-types: 6.21.0
@@ -5420,8 +5087,6 @@ snapshots:
   '@types/trusted-types@2.0.7':
     optional: true
 
-  '@types/web-bluetooth@0.0.20': {}
-
   '@types/web-bluetooth@0.0.21': {}
 
   '@types/webxr@0.5.24': {}
@@ -5737,23 +5402,6 @@ snapshots:
 
   '@vue/tsconfig@0.5.1': {}
 
-  '@vueuse/core@11.3.0(vue@3.5.40(typescript@5.6.3))':
-    dependencies:
-      '@types/web-bluetooth': 0.0.20
-      '@vueuse/metadata': 11.3.0
-      '@vueuse/shared': 11.3.0(vue@3.5.40(typescript@5.6.3))
-      vue-demi: 0.14.10(vue@3.5.40(typescript@5.6.3))
-    transitivePeerDependencies:
-      - '@vue/composition-api'
-      - vue
-
-  '@vueuse/core@14.3.0(vue@3.5.40(typescript@5.6.3))':
-    dependencies:
-      '@types/web-bluetooth': 0.0.21
-      '@vueuse/metadata': 14.3.0
-      '@vueuse/shared': 14.3.0(vue@3.5.40(typescript@5.6.3))
-      vue: 3.5.40(typescript@5.6.3)
-
   '@vueuse/core@14.4.0(vue@3.5.40(typescript@5.6.3))':
     dependencies:
       '@types/web-bluetooth': 0.0.21
@@ -5761,23 +5409,8 @@ snapshots:
       '@vueuse/shared': 14.4.0(vue@3.5.40(typescript@5.6.3))
       vue: 3.5.40(typescript@5.6.3)
 
-  '@vueuse/metadata@11.3.0': {}
-
-  '@vueuse/metadata@14.3.0': {}
-
   '@vueuse/metadata@14.4.0': {}
 
-  '@vueuse/shared@11.3.0(vue@3.5.40(typescript@5.6.3))':
-    dependencies:
-      vue-demi: 0.14.10(vue@3.5.40(typescript@5.6.3))
-    transitivePeerDependencies:
-      - '@vue/composition-api'
-      - vue
-
-  '@vueuse/shared@14.3.0(vue@3.5.40(typescript@5.6.3))':
-    dependencies:
-      vue: 3.5.40(typescript@5.6.3)
-
   '@vueuse/shared@14.4.0(vue@3.5.40(typescript@5.6.3))':
     dependencies:
       vue: 3.5.40(typescript@5.6.3)
@@ -5812,7 +5445,7 @@ snapshots:
   ajv@8.20.0:
     dependencies:
       fast-deep-equal: 3.1.3
-      fast-uri: 3.1.4
+      fast-uri: 3.1.5
       json-schema-traverse: 1.0.0
       require-from-string: 2.0.2
 
@@ -5859,8 +5492,6 @@ snapshots:
 
   async-function@1.0.0: {}
 
-  async-validator@4.2.5: {}
-
   asynckit@0.4.0: {}
 
   atomic-sleep@1.0.0: {}
@@ -5882,8 +5513,6 @@ snapshots:
 
   baseline-browser-mapping@2.11.8: {}
 
-  batch-processor@1.0.0: {}
-
   birpc@2.9.0: {}
 
   boolbase@1.0.0: {}
@@ -6214,8 +5843,6 @@ snapshots:
 
   dateformat@4.6.3: {}
 
-  dayjs@1.11.21: {}
-
   de-indent@1.0.2: {}
 
   debug@4.4.3:
@@ -6251,7 +5878,7 @@ snapshots:
   detect-libc@2.1.2:
     optional: true
 
-  dompurify@3.4.12:
+  dompurify@3.4.13:
     optionalDependencies:
       '@types/trusted-types': 2.0.7
 
@@ -6279,29 +5906,6 @@ snapshots:
 
   electron-to-chromium@1.5.399: {}
 
-  element-plus@2.14.3(vue@3.5.40(typescript@5.6.3)):
-    dependencies:
-      '@ctrl/tinycolor': 4.2.0
-      '@element-plus/icons-vue': 2.3.2(vue@3.5.40(typescript@5.6.3))
-      '@floating-ui/dom': 1.8.0
-      '@popperjs/core': '@sxzz/popperjs-es@2.11.8'
-      '@types/lodash': 4.17.24
-      '@types/lodash-es': 4.17.12
-      '@vueuse/core': 14.3.0(vue@3.5.40(typescript@5.6.3))
-      async-validator: 4.2.5
-      dayjs: 1.11.21
-      lodash: 4.18.1
-      lodash-es: 4.18.1
-      lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.18.1)(lodash@4.18.1)
-      memoize-one: 6.0.0
-      normalize-wheel-es: 1.2.0
-      vue: 3.5.40(typescript@5.6.3)
-      vue-component-type-helpers: 3.3.9
-
-  element-resize-detector@1.2.4:
-    dependencies:
-      batch-processor: 1.0.0
-
   emoji-regex@8.0.0: {}
 
   emoji-regex@9.2.2: {}
@@ -6632,7 +6236,7 @@ snapshots:
       '@fastify/merge-json-schemas': 0.2.1
       ajv: 8.20.0
       ajv-formats: 3.0.1(ajv@8.20.0)
-      fast-uri: 4.1.1
+      fast-uri: 4.1.2
       json-schema-ref-resolver: 3.0.0
       rfdc: 1.4.1
 
@@ -6644,9 +6248,9 @@ snapshots:
 
   fast-safe-stringify@2.1.1: {}
 
-  fast-uri@3.1.4: {}
+  fast-uri@3.1.5: {}
 
-  fast-uri@4.1.1: {}
+  fast-uri@4.1.2: {}
 
   fastify-plugin@6.0.0: {}
 
@@ -6811,13 +6415,6 @@ snapshots:
 
   graceful-fs@4.2.11: {}
 
-  graphql-request@7.4.0(graphql@16.14.2):
-    dependencies:
-      '@graphql-typed-document-node/core': 3.2.0(graphql@16.14.2)
-      graphql: 16.14.2
-
-  graphql@16.14.2: {}
-
   has-bigints@1.1.0: {}
 
   has-flag@3.0.0: {}
@@ -7057,7 +6654,7 @@ snapshots:
 
   js-tokens@4.0.0: {}
 
-  js-yaml@4.3.0:
+  js-yaml@4.3.1:
     dependencies:
       argparse: 2.0.1
 
@@ -7144,14 +6741,6 @@ snapshots:
     dependencies:
       p-locate: 5.0.0
 
-  lodash-es@4.18.1: {}
-
-  lodash-unified@1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.18.1)(lodash@4.18.1):
-    dependencies:
-      '@types/lodash-es': 4.17.12
-      lodash: 4.18.1
-      lodash-es: 4.18.1
-
   lodash.merge@4.6.2: {}
 
   lodash@4.18.1: {}
@@ -7172,8 +6761,6 @@ snapshots:
 
   math-intrinsics@1.1.0: {}
 
-  memoize-one@6.0.0: {}
-
   memorystream@0.3.1: {}
 
   merge2@1.4.1: {}
@@ -7209,11 +6796,9 @@ snapshots:
 
   minipass@7.1.3: {}
 
-  mitt@2.1.0: {}
-
   monaco-editor@0.55.1:
     dependencies:
-      dompurify: 3.4.12
+      dompurify: 3.4.13
       marked: 14.0.0
 
   ms@2.1.3: {}
@@ -7222,7 +6807,7 @@ snapshots:
 
   mustache@4.2.0: {}
 
-  nanoid@3.3.16: {}
+  nanoid@3.3.18: {}
 
   natural-compare@1.4.0: {}
 
@@ -7248,8 +6833,6 @@ snapshots:
       semver: 5.7.2
       validate-npm-package-license: 3.0.4
 
-  normalize-wheel-es@1.2.0: {}
-
   npm-run-all@4.1.5:
     dependencies:
       ansi-styles: 3.2.1
@@ -7459,7 +7042,7 @@ snapshots:
 
   postcss@8.5.25:
     dependencies:
-      nanoid: 3.3.16
+      nanoid: 3.3.18
       picocolors: 1.1.1
       source-map-js: 1.2.1
 
@@ -8066,20 +7649,6 @@ snapshots:
     transitivePeerDependencies:
       - supports-color
 
-  vue-grid-layout@3.0.0-beta1(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)(typescript@5.6.3):
-    dependencies:
-      '@interactjs/actions': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/auto-start': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      '@interactjs/dev-tools': 1.10.27(@interactjs/modifiers@1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)(typescript@5.6.3)
-      '@interactjs/interactjs': 1.10.27(typescript@5.6.3)
-      '@interactjs/modifiers': 1.10.27(@interactjs/core@1.10.27(@interactjs/utils@1.10.27))(@interactjs/utils@1.10.27)
-      element-resize-detector: 1.2.4
-      mitt: 2.1.0
-    transitivePeerDependencies:
-      - '@interactjs/core'
-      - '@interactjs/utils'
-      - typescript
-
   vue-i18n@10.0.8(vue@3.5.40(typescript@5.6.3)):
     dependencies:
       '@intlify/core-base': 10.0.8
diff --git a/scripts/check-security-selftest.mjs b/scripts/check-security-selftest.mjs
new file mode 100644
index 0000000..c18eb2e
--- /dev/null
+++ b/scripts/check-security-selftest.mjs
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Adversarial fixtures for `check-security.mjs`.
+//
+// A gate that has only ever been run against a clean repository has proved one
+// thing: that it passes. Every case below is a payload that ONCE slipped past
+// it — entity-encoded schemes, `/`-delimited tags, `.SVG`, unquoted and
+// `.prop` bindings, JSON-escaped URLs, a duplicate key written through a
+// unicode escape. They are kept as fixtures because each one was found by
+// someone attacking the gate, and a regex is exactly the kind of code that
+// silently stops matching.
+//
+// There is no test runner at the repo root, so this is a script in the same
+// shape as its subject, run beside it from `pnpm lint:security`.
+
+import { mkdtempSync, mkdirSync, writeFileSync, cpSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join, dirname } from 'node:path';
+import { execFileSync } from 'node:child_process';
+
+const ROOT = new URL('..', import.meta.url).pathname;
+const GATE = join(ROOT, 'scripts/check-security.mjs');
+
+/** A minimal tree with the layout the gate expects, plus `files`. */
+function fixture(files) {
+  const root = mkdtempSync(join(tmpdir(), 'sec-fx-'));
+  const seed = {
+    'apps/ui/index.html': '<!doctype html><html><head></head><body></body></html>',
+    'apps/ui/src/app.vue': '<template><div /></template>',
+    'apps/bff/src/bundled_templates/layers/general.json': '{"key":"GENERAL"}',
+    ...files,
+  };
+  for (const [rel, body] of Object.entries(seed)) {
+    const abs = join(root, rel);
+    mkdirSync(dirname(abs), { recursive: true });
+    writeFileSync(abs, body);
+  }
+  return root;
+}
+
+/** Run the real gate over a fixture root; return its findings as text. */
+function scan(root) {
+  try {
+    execFileSync('node', [GATE], {
+      env: { ...process.env, HORIZON_SCAN_ROOT: root },
+      encoding: 'utf8',
+      stdio: ['ignore', 'pipe', 'pipe'],
+    });
+    return '';
+  } catch (err) {
+    return `${err.stdout ?? ''}${err.stderr ?? ''}`;
+  }
+}
+
+const SVG_IMPORTER = `<script setup>import s from '@/assets/icons/logo.svg?raw';</script>
+<template><span v-html="s" /></template>`;
+
+/** `[name, files, expected]` — expected '' means the fixture must PASS. */
+const CASES = [
+  [
+    'clean tree passes',
+    { 'apps/ui/src/assets/icons/logo.svg': '<svg xmlns="http://www.w3.org/2000/svg"></svg>' },
+    '',
+  ],
+  [
+    'entity-encoded javascript: in a ?raw SVG',
+    {
+      'apps/ui/src/app.vue': SVG_IMPORTER,
+      'apps/ui/src/assets/icons/logo.svg': '<svg><a href="java&#115;cript:alert(1)">x</a></svg>',
+    },
+    'javascript:',
+  ],
+  [
+    'slash-delimited tag evades element detection',
+    {
+      'apps/ui/src/app.vue': SVG_IMPORTER,
+      'apps/ui/src/assets/icons/logo.svg': '<svg><iframe/src="https://evil.example/"></iframe></svg>',
+    },
+    'embedded browsing context',
+  ],
+  [
+    'uppercase .SVG escapes both the SVG and image families',
+    { 'apps/ui/src/assets/icons/logo.SVG': '<svg><script>alert(1)</script></svg>' },
+    '<script> element',
+  ],
+  [
+    'unquoted :href binding',
+    { 'apps/ui/src/app.vue': '<template><a :href=evilUrl>x</a></template>' },
+    'unregistered',
+  ],
+  [
+    '.prop shorthand binding',
+    { 'apps/ui/src/app.vue': '<template><a .href="evilUrl">x</a></template>' },
+    'unregistered',
+  ],
+  [
+    'remote resource keeps no host exemption',
+    {
+      'apps/ui/src/app.vue':
+        '<template><img src="https://skywalking.apache.org/x.png" /></template>',
+    },
+    'remote resource',
+  ],
+  [
+    'bare-string @import',
+    { 'apps/ui/src/a.css': '@import "https://evil.example/x.css";' },
+    'remote @import',
+  ],
+  [
+    'ordinary remote url() in CSS',
+    { 'apps/ui/src/a.css': '.x{background:url(https://evil.example/bg.png)}' },
+    'remote CSS asset',
+  ],
+  [
+    'JSON-escaped remote URL in a template',
+    {
+      'apps/bff/src/bundled_templates/layers/general.json':
+        '{"key":"GENERAL","icon":"https:\\/\\/evil.example\\/x.png"}',
+    },
+    'external URL',
+  ],
+  [
+    'duplicate key written through a unicode escape',
+    {
+      'apps/bff/src/bundled_templates/layers/general.json':
+        '{"key":"GENERAL","alias":"a","\\u0061lias":"b"}',
+    },
+    'duplicate JSON key',
+  ],
+  [
+    'asset type outside the allow-list',
+    { 'apps/ui/public/icon.gif': 'GIF89a' },
+    'not an allowed asset type',
+  ],
+  [
+    'bytes disagree with the extension',
+    { 'apps/ui/public/x.png': '<html><script>alert(1)</script></html>' },
+    'bytes are not .png',
+  ],
+  [
+    'a wide array must not crash the depth check',
+    {
+      'apps/bff/src/bundled_templates/layers/general.json': `{"key":"GENERAL","a":[${'1,'.repeat(199999)}1]}`,
+    },
+    '',
+  ],
+];
+
+let failed = 0;
+for (const [name, files, expected] of CASES) {
+  const out = scan(fixture(files));
+  const ok = expected === '' ? out === '' : out.includes(expected);
+  if (!ok) {
+    failed++;
+    console.error(`✗ ${name}`);
+    console.error(expected === '' ? '    expected NO findings, got:' : `    expected a finding containing ${JSON.stringify(expected)}, got:`);
+    console.error(`    ${out.trim().split('\n').join('\n    ') || '(nothing)'}`);
+  }
+}
+
+if (failed > 0) {
+  console.error(`\n✗ security self-test: ${failed}/${CASES.length} case(s) failed`);
+  console.error('  The gate stopped detecting something it used to. Fix the check, not the fixture.');
+  process.exit(1);
+}
+console.log(`✓ security self-test OK: ${CASES.length} adversarial fixtures still detected`);
diff --git a/scripts/check-security.mjs b/scripts/check-security.mjs
new file mode 100644
index 0000000..41df203
--- /dev/null
+++ b/scripts/check-security.mjs
@@ -0,0 +1,534 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Security gate (`pnpm lint:security`). Four checks that a schema or a
+// type-checker structurally cannot make, each anchored to a defect this
+// project has actually reasoned about:
+//
+//   1. SVG payloads. An SVG imported with Vite's `?raw` suffix and
+//      rendered through v-html becomes LIVE DOM and can execute script.
+//      Every other image path (<img>, CSS background, three.js
+//      TextureLoader) is the browser's secure static mode, where SVG
+//      script never runs. Active content is a finding in EITHER case —
+//      it has no business in a shipped asset — and the message says
+//      which of the two you are looking at.
+//   2. External references. The house rule is that every asset is
+//      vendored; a remote reference in a shipped asset defeats both the
+//      offline install and the CSP. This is the rule's enforcement.
+//   3. URL-bearing bindings. `documentLink` reached an `<a :href>` with
+//      no validation because nothing announced a new URL sink. The
+//      binding set is tiny and deliberate, so it is pinned: adding one
+//      is a review event, not a silent diff.
+//   4. Template text structure. Duplicate JSON keys are invisible to
+//      every schema — `JSON.parse` keeps the last and drops the rest
+//      before zod ever sees the object — and deep nesting overflows the
+//      i18n merge walker's stack (~5k levels, ~29 KB) long before any
+//      size limit trips. Both are raw-text properties, so they are
+//      checked here rather than in the zod validator.
+//
+// Runtime enforcement is a separate concern: this gate covers what the
+// repo ships, not what an operator later stores on OAP.
+
+import { readFileSync, readdirSync, statSync } from 'node:fs';
+import { join, relative, extname } from 'node:path';
+
+// Overridable so `--self-test` can point the SAME code path at a fixture
+// tree. A gate that only ever proves "today's repo passes" has never shown it
+// can fail.
+const ROOT = process.env.HORIZON_SCAN_ROOT ?? new URL('..', import.meta.url).pathname;
+const UI_SRC = join(ROOT, 'apps/ui/src');
+const UI_PUBLIC = join(ROOT, 'apps/ui/public');
+const BUNDLED = join(ROOT, 'apps/bff/src/bundled_templates');
+// Imported app-wide from the UI entry and named by CLAUDE.md as the canonical
+// token stylesheet — a remote reference here ships to every page.
+const DESIGN_TOKENS = join(ROOT, 'packages/design-tokens/src');
+
+const findings = [];
+const report = (where, message) => findings.push([where, message]);
+const rel = (p) => relative(ROOT, p);
+
+function walk(dir, out = []) {
+  let entries;
+  try {
+    entries = readdirSync(dir, { withFileTypes: true });
+  } catch {
+    return out;
+  }
+  for (const e of entries) {
+    if (e.name === 'node_modules' || e.name === 'dist') continue;
+    const p = join(dir, e.name);
+    if (e.isDirectory()) walk(p, out);
+    else out.push(p);
+  }
+  return out;
+}
+
+// ---------------------------------------------------------------- 1. SVG
+
+// Constructs that execute or reach off-origin. The strict set applies to
+// SVGs that become live DOM; the baseline set to every SVG we ship.
+/** Character references decode BEFORE the parser stores an attribute, so a
+ *  scan of the raw bytes sees inert text where the browser sees a live URL
+ *  (`java&#115;cript:`). Decoding here is what makes the patterns below mean
+ *  what they say — matching raw text while claiming otherwise is worse than
+ *  not checking, because it reads as covered. */
+function decodeEntities(text) {
+  return text
+    .replace(/&#x([0-9a-f]+);?/gi, (_m, hex) => String.fromCodePoint(parseInt(hex, 16)))
+    .replace(/&#(\d+);?/g, (_m, dec) => String.fromCodePoint(parseInt(dec, 10)))
+    .replace(/&(amp|lt|gt|quot|apos|colon|Tab|NewLine);/gi, (_m, name) => {
+      const named = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'", colon: ':', tab: '\t', newline: '\n' };
+      return named[String(name).toLowerCase()] ?? _m;
+    });
+}
+
+// `[\s/]` after the tag name: the tokenizer reaches before-attribute-name
+// state through `/` as well, so `<iframe/src=…>` is the same element as
+// `<iframe src=…>`.
+const SVG_ACTIVE = [
+  [/<script[\s/>]/i, '<script> element'],
+  // `/` also reaches before-attribute-name state, so `<animate/onbegin=…>`
+  // parses to the same handler as the space-separated form.
+  [/[\s/]on[a-z]+\s*=/i, 'inline event handler attribute'],
+  [/javascript\s*:/i, 'javascript: URL'],
+  [/<foreignObject[\s/>]/i, '<foreignObject> (can host HTML + script)'],
+  [/<!ENTITY/i, 'DTD entity (XXE / billion-laughs vector)'],
+  [/<!DOCTYPE/i, 'DOCTYPE declaration'],
+  [/<(iframe|embed|object)[\s/>]/i, 'embedded browsing context'],
+];
+const EXTERNAL_REF = [
+  [/(?:xlink:)?href\s*=\s*["']https?:\/\//i, 'external href'],
+  [/url\(\s*["']?https?:\/\//i, 'external url() reference'],
+  [/<use[^>]+href\s*=\s*["'](?!#)/i, '<use> pointing outside this document'],
+];
+
+/** SVGs pulled in with `?raw` — the only ones that reach v-html. */
+function rawImportedSvgs(uiFiles) {
+  const names = new Set();
+  for (const f of uiFiles) {
+    if (!/\.(vue|ts)$/.test(f)) continue;
+    for (const m of readFileSync(f, 'utf8').matchAll(/['"][^'"]*\/([\w.-]+\.svg)\?raw['"]/g)) {
+      names.add(m[1]);
+    }
+  }
+  return names;
+}
+
+function checkSvgAssets(uiFiles) {
+  // Case-insensitive: `logo.SVG` is loadable by Vite's `?raw` exactly like
+  // `logo.svg`, and a case-sensitive filter let it escape BOTH this family
+  // and the image check (whose lookup lowercases), i.e. every content check.
+  const svgs = uiFiles.filter((f) => extname(f).toLowerCase() === '.svg');
+  const raw = rawImportedSvgs(uiFiles);
+  for (const f of svgs) {
+    // Both the raw bytes and the decoded form: an entity hides a construct
+    // from the first, and a decoded `&lt;script&gt;` is inert text that the
+    // second must not report.
+    const source = readFileSync(f, 'utf8');
+    const text = `${source}\n${decodeEntities(source)}`;
+    const base = f.split('/').pop();
+    const strict = raw.has(base);
+    for (const [re, what] of SVG_ACTIVE) {
+      if (!re.test(text)) continue;
+      // Active content only EXECUTES from the ?raw set (v-html). Elsewhere the
+      // browser's static image mode neutralises it, so it is reported as a
+      // finding there too but named for what it is — the two tiers differ in
+      // wording only because both are defects in a shipped asset.
+      report(
+        rel(f),
+        strict
+          ? `${what} — this SVG is ?raw-imported into v-html, so it EXECUTES`
+          : `${what} — inert in an <img> context, but not something we ship`,
+      );
+    }
+    for (const [re, what] of EXTERNAL_REF) {
+      if (re.test(text)) report(rel(f), `${what} — assets must be vendored`);
+    }
+  }
+  return { scanned: svgs.length, strict: raw.size };
+}
+
+// Image policy: png, jpg and svg only, and the bytes must be what the name
+// claims. Two properties, one check — a file whose content disagrees with its
+// extension is served under the wrong Content-Type and is the shape a polyglot
+// takes, and a format outside the set is one nothing here is prepared to
+// handle. gif and webp are NOT supported: `useTopologyIcons` globs
+// `*.{png,jpg}` and filters on the same two, so such a file silently drops out
+// of the icon registry rather than failing — convert it, do not rename it.
+const IMAGE_MAGIC = {
+  '.png': [0x89, 0x50, 0x4e, 0x47],
+  '.jpg': [0xff, 0xd8, 0xff],
+  '.jpeg': [0xff, 0xd8, 0xff],
+};
+// Anything shipped under these trees that is not source, config or an
+// allowed image is a finding — an ALLOW-list, because a deny-list of formats
+// silently waved through .jfif, .apng, .svgz, an extensionless file, and even
+// a stray .html dropped into public/.
+const NON_ASSET_EXT = new Set([
+  '.ts', '.vue', '.js', '.mjs', '.cjs', '.json', '.css', '.scss', '.md',
+  '.woff', '.woff2', '.ttf', '.otf', '.d.ts', '.map', '.txt', '.yaml', '.yml',
+]);
+
+function checkImages(uiFiles) {
+  let scanned = 0;
+  for (const f of uiFiles) {
+    const ext = extname(f).toLowerCase();
+    if (ext === '.svg') continue; // its own family
+    if (NON_ASSET_EXT.has(ext)) continue;
+    const want = IMAGE_MAGIC[ext];
+    if (!want) {
+      report(
+        rel(f),
+        `${ext || '(no extension)'} is not an allowed asset type — images must be .png, .jpg or .svg`,
+      );
+      scanned++;
+      continue;
+    }
+    scanned++;
+    const head = readFileSync(f).subarray(0, 8);
+    if (!want.every((b, i) => head[i] === b)) {
+      report(
+        rel(f),
+        `bytes are not ${ext} — convert the asset rather than renaming it, or the topology-icon glob drops it`,
+      );
+    }
+  }
+  return scanned;
+}
+
+// --------------------------------------------------- 2. external references
+
+function checkNoExternalRefs(uiFiles) {
+  const indexHtml = join(ROOT, 'apps/ui/index.html');
+  const html = readFileSync(indexHtml, 'utf8');
+  for (const m of html.matchAll(/<(?:link|script)[^>]+(?:href|src)\s*=\s*["']https?:\/\/[^"']+/gi)) {
+    report(rel(indexHtml), `remote asset reference — ${m[0].slice(0, 70)}`);
+  }
+
+  for (const f of uiFiles) {
+    if (!/\.(vue|css|scss)$/.test(f)) continue;
+    const text = readFileSync(f, 'utf8');
+    // `@import url(...)` AND the bare-string form `@import "https://…";`,
+    // which browsers fetch identically.
+    for (const m of text.matchAll(/@import\s+(?:url\(\s*)?["']?(?:https?:)?\/\//gi)) {
+      report(rel(f), `remote @import — ${m[0].slice(0, 60)}`);
+    }
+    for (const m of text.matchAll(/@font-face[^}]*src\s*:[^}]*url\(\s*["']?https?:\/\//gi)) {
+      report(rel(f), 'remote webfont — fonts must be vendored');
+    }
+    // Any ordinary remote `url()` — a background-image, a mask, a cursor,
+    // a list-style. `data:` and relative references are the normal case and
+    // are left alone; only a reference that leaves the origin is a finding.
+    for (const m of text.matchAll(/url\(\s*["']?((?:https?:)?\/\/[^"')\s]+)/gi)) {
+      report(rel(f), `remote CSS asset — ${m[1].slice(0, 70)}`);
+    }
+  }
+}
+
+/** `documentLink` is the product's one operator-supplied outbound link;
+ *  its destination is a runtime policy question, not a build-time one. */
+const TEMPLATE_URL_ALLOWED_KEYS = new Set(['documentLink']);
+
+// Walks the PARSED value, so `https:\/\/…` (a legal JSON escape decoding to
+// the same string), a URL inside an array, and a non-word key are all seen —
+// the loader reads JSON.parse output, so the check must too.
+function checkTemplateExternalRefs(file, parsed) {
+  const walkValue = (node, key) => {
+    if (typeof node === 'string') {
+      if (/^\s*(?:https?:)?\/\//i.test(node) && !TEMPLATE_URL_ALLOWED_KEYS.has(key)) {
+        report(
+          rel(file),
+          `external URL under "${key ?? '(root)'}" — templates may not reference remote resources`,
+        );
+      }
+      return;
+    }
+    if (Array.isArray(node)) {
+      for (const v of node) walkValue(v, key);
+      return;
+    }
+    if (node && typeof node === 'object') {
+      for (const [k, v] of Object.entries(node)) walkValue(v, k);
+    }
+  };
+  walkValue(parsed, undefined);
+}
+
+// ------------------------------------------------- 3. URL-bearing bindings
+
+// Every dynamic `:href` / `:src` in the UI, with the reason it is safe.
+// A binding missing from this map fails the gate: adding a URL sink must
+// be a deliberate, reviewed act.
+const URL_BINDINGS = new Map([
+  ['apps/ui/src/features/infra-3d/Infra3DScene.vue:openDashboardHref', 'internal router path'],
+  [
+    'apps/ui/src/layer/LayerShell.vue:layer.documentLink',
+    'operator-supplied; scheme refused unless http(s)/same-origin and host checked against security.trustedLinkDomains, on both the publish and the read path',
+  ],
+  ['apps/ui/src/layer/service-map/LayerServiceMapView.vue:nodeIconUrl(n)!', 'bundled icon registry'],
+  ["apps/ui/src/render/widgets/TraceStatsView.vue:componentIconOrNull(c.name) ?? ''", 'bundled icon registry'],
+  ["apps/ui/src/render/widgets/TraceTreeView.vue:componentIconOrNull(n.span.component) ?? ''", 'bundled icon registry'],
+  ["apps/ui/src/render/widgets/TraceWaterfallView.vue:componentIconOrNull(row.span.component) ?? ''", 'bundled icon registry'],
+  ["apps/ui/src/layer/traces/TracePopout.vue:componentIconOrNull(row.span.component) ?? ''", 'bundled icon registry'],
+  ["apps/ui/src/layer/traces/NativeTraceWaterfall.vue:componentIconOrNull(row.span.component ?? '') ?? ''", 'bundled icon registry'],
+]);
+
+// All the spellings Vue compiles to the SAME href/src binding: `:href="x"`,
+// `:href='x'`, `:href=x` (unquoted is valid HTML), `:HREF=` (attribute names
+// are case-insensitive), `v-bind:href=`, `.href=` (the .prop shorthand) and
+// modifier forms like `:href.attr=`. Each was verified to produce byte-
+// identical DOM. No lint rule normalizes any of this — `flat/essential`
+// carries neither `vue/v-bind-style` nor `vue/html-quotes` — so the table
+// has to recognise every spelling itself or it is bypassable by syntax alone.
+const URL_BINDING_RE =
+  /(?:^|[\s<])(?::|v-bind:|\.)(href|src)(?:\.[\w.]+)?\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>"'`]+))/gi;
+
+// Forms that can carry an href/src the table cannot see: a dynamic attribute
+// name, or a spread object literal that names one. A plain `v-bind="expr"` is
+// NOT flagged — the only one in the tree binds a router-link `to`, and failing
+// on every object spread would make this gate red over ordinary Vue.
+//
+// Residual gap, stated rather than papered over: an opaque `v-bind="expr"`
+// whose object happens to contain `href` is invisible here. Closing it needs a
+// template AST, not a regex.
+const OPAQUE_BINDING_RE = /(?:^|[\s<]):\[|v-bind\s*=\s*["']\s*\{[^}]*\b(?:href|src)\b/g;
+
+function checkUrlBindings(uiFiles) {
+  const seen = new Set();
+  for (const f of uiFiles) {
+    if (extname(f) !== '.vue') continue;
+    const text = readFileSync(f, 'utf8');
+    for (const m of text.matchAll(URL_BINDING_RE)) {
+      const value = m[2] ?? m[3] ?? m[4] ?? '';
+      const id = `${rel(f)}:${value}`;
+      seen.add(id);
+      if (!URL_BINDINGS.has(id)) {
+        report(rel(f), `unregistered :${m[1]} binding — ${JSON.stringify(value)}`);
+      }
+    }
+    for (const _m of text.matchAll(OPAQUE_BINDING_RE)) {
+      void _m;
+      report(
+        rel(f),
+        'dynamic or spread attribute binding — its target cannot be checked statically; bind href/src explicitly',
+      );
+    }
+  }
+  // Staleness is a claim about THIS repository's inventory, so it is skipped
+  // when a fixture root is being scanned — there the table legitimately names
+  // files the tree does not have.
+  if (!process.env.HORIZON_SCAN_ROOT) {
+    for (const id of URL_BINDINGS.keys()) {
+      if (!seen.has(id)) {
+        report(id.split(':')[0], 'registered URL binding no longer exists — drop it from URL_BINDINGS');
+      }
+    }
+  }
+  return seen.size;
+}
+
+/** Hosts a hardcoded NAVIGATION link (`<a href>`) in shipped markup may point
+ *  at. Mirrors the DEFAULT of `security.trustedLinkDomains`; an operator's own
+ *  allow-list governs template-supplied links at runtime, not this build-time
+ *  check.
+ *
+ *  It does NOT apply to resources. A remote `<img src>`, stylesheet, script or
+ *  iframe fails whatever its host: the rule is that assets are vendored, and
+ *  "we happen to trust that domain" is not vendoring — it still means the page
+ *  fetches from the network at render time and breaks an air-gapped install. */
+const STATIC_LINK_HOSTS = ['skywalking.apache.org'];
+
+/** Remote URLs written literally into a template — `<img src="https://…">`,
+ *  `<iframe src>`, `<a href>`. None of the other families looked at these:
+ *  the SVG patterns apply only to `.svg` files and the CSS ones only to
+ *  `@import` / `@font-face`. A remote asset defeats both the offline install
+ *  and the CSP; a remote link leaves the console without passing the policy. */
+function checkStaticRemoteRefs(uiFiles) {
+  // index.html is the app's entry document and lives outside both scanned
+  // trees, so it is appended explicitly — a remote <script> there is the most
+  // direct supply-chain insert available.
+  for (const f of [...uiFiles, join(ROOT, 'apps/ui/index.html')]) {
+    if (!/\.(vue|html)$/i.test(f)) continue;
+    const text = readFileSync(f, 'utf8');
+    // Quoted, unquoted, and protocol-relative (`//host/x` loads over the page
+    // scheme and is just as remote).
+    for (const m of text.matchAll(
+      /(<a\s[^>]*?)?\b(src|href|xlink:href)\s*=\s*(?:["']((?:https?:)?\/\/[^"']+)["']|((?:https?:)?\/\/[^\s>"'`]+))/gi,
+    )) {
+      const raw = m[3] ?? m[4] ?? '';
+      // Only a navigation link earns the host exemption; `src` never does,
+      // and neither does an `href` that is not on an anchor.
+      const isNavigation = Boolean(m[1]) && m[2].toLowerCase() === 'href';
+      let host = '';
+      try {
+        host = new URL(raw.startsWith('//') ? `https:${raw}` : raw).hostname.toLowerCase();
+      } catch {
+        host = '';
+      }
+      if (isNavigation && STATIC_LINK_HOSTS.includes(host)) continue;
+      report(
+        rel(f),
+        isNavigation
+          ? `remote link in markup — ${raw.slice(0, 70)}`
+          : `remote resource in markup — ${raw.slice(0, 70)} (assets must be vendored)`,
+      );
+    }
+  }
+}
+
+// --------------------------------------------- 4. bundled template structure
+
+/** The i18n merge walker recurses without a depth guard, so a pathological
+ *  tree overflows its stack. Deepest shipped template is 7. */
+const MAX_TEMPLATE_DEPTH = 32;
+
+// Iterative, and it stops as soon as the cap is exceeded. The recursive
+// version died two ways of its own: `Math.max(0, ...arr.map(...))` spread
+// every element as a call argument, so a FLAT 125k array (depth 1) threw
+// RangeError, and the recursion itself threw past ~3000 levels — killing the
+// gate mid-run, which left every later template unchecked behind a stack
+// trace. A depth checker must not share the failure mode it exists to catch.
+function exceedsDepth(value, limit) {
+  const stack = [[value, 1]];
+  let deepest = 0;
+  while (stack.length > 0) {
+    const [node, depth] = stack.pop();
+    if (node === null || typeof node !== 'object') continue;
+    if (depth > deepest) deepest = depth;
+    if (depth > limit) return { exceeded: true, depth };
+    for (const child of Array.isArray(node) ? node : Object.values(node)) {
+      if (child !== null && typeof child === 'object') stack.push([child, depth + 1]);
+    }
+  }
+  return { exceeded: false, depth: deepest };
+}
+
+function checkTemplates() {
+  const files = walk(BUNDLED).filter((f) => extname(f) === '.json');
+  for (const f of files) {
+    const raw = readFileSync(f, 'utf8');
+
+
+    let parsed;
+    try {
+      parsed = JSON.parse(raw);
+    } catch (e) {
+      report(rel(f), `invalid JSON — ${e.message}`);
+      continue;
+    }
+    checkTemplateExternalRefs(f, parsed);
+
+    // Duplicate keys survive only in the text: JSON.parse keeps the last
+    // occurrence, so no schema can ever observe the loss.
+    const dupes = new Set(duplicateKeys(raw));
+    if (dupes.size > 0) {
+      report(rel(f), `duplicate JSON key(s) ${[...dupes].map((k) => `"${k}"`).join(', ')} — JSON.parse silently keeps the last; no schema can catch this`);
+    }
+
+    const depth = exceedsDepth(parsed, MAX_TEMPLATE_DEPTH);
+    if (depth.exceeded) {
+      report(
+        rel(f),
+        `nesting depth exceeds ${MAX_TEMPLATE_DEPTH} — the i18n merge walker recurses per level`,
+      );
+    }
+
+    if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
+      if ('layer-header' in parsed && 'metrics' in parsed) {
+        report(rel(f), 'both "layer-header" and the legacy "metrics" alias are present — which one applies is implicit');
+      }
+    }
+  }
+  return files.length;
+}
+
+/** Duplicate keys within the SAME object, found by tracking the object
+ *  nesting the tokenizer is in. String and escape aware. */
+function duplicateKeys(raw) {
+  const dupes = [];
+  const stack = [];
+  let i = 0;
+  while (i < raw.length) {
+    const c = raw[i];
+    if (c === '"') {
+      let j = i + 1;
+      let token = '';
+      while (j < raw.length && raw[j] !== '"') {
+        if (raw[j] === '\\') {
+          token += raw[j] + raw[j + 1];
+          j += 2;
+          continue;
+        }
+        token += raw[j];
+        j++;
+      }
+      // Compare DECODED names: `"a"` and `"a"` are one key to JSON.parse,
+      // so comparing the raw source text would miss the duplicate entirely.
+      let str;
+      try {
+        str = JSON.parse(`"${token}"`);
+      } catch {
+        str = token;
+      }
+      // A string is a KEY when the next non-space character is a colon.
+      let k = j + 1;
+      while (k < raw.length && /\s/.test(raw[k])) k++;
+      if (raw[k] === ':' && stack.length > 0) {
+        const top = stack[stack.length - 1];
+        if (top) {
+          if (top.has(str)) dupes.push(str);
+          else top.add(str);
+        }
+      }
+      i = j + 1;
+      continue;
+    }
+    if (c === '{') stack.push(new Set());
+    else if (c === '[') stack.push(null);
+    else if (c === '}' || c === ']') stack.pop();
+    i++;
+  }
+  return dupes;
+}
+
+// ---------------------------------------------------------------- run
+
+// `public/` is served verbatim by @fastify/static and never passes through the
+// bundler, so an asset dropped there reaches the browser without any of the
+// build's checks — it belongs in the scan more than `src/` does, not less.
+const uiFiles = [...walk(UI_SRC), ...walk(UI_PUBLIC), ...walk(DESIGN_TOKENS)];
+const svg = checkSvgAssets(uiFiles);
+const images = checkImages(uiFiles);
+checkNoExternalRefs(uiFiles);
+checkStaticRemoteRefs(uiFiles);
+const bindings = checkUrlBindings(uiFiles);
+const templates = checkTemplates();
+
+if (findings.length > 0) {
+  console.error(`✗ ${findings.length} security finding(s):`);
+  for (const [where, message] of findings) console.error(`  ${where}: ${message}`);
+  console.error(
+    '\n  These gates encode decisions, not style. If one is genuinely wrong,\n' +
+      '  change the rule deliberately — do not work around it.',
+  );
+  process.exit(1);
+}
+
+console.log(
+  `✓ security OK: ${svg.scanned} SVG (${svg.strict} live-DOM), ${images} images, ` +
+    `${bindings} URL bindings, ${templates} bundled templates`,
+);
diff --git a/scripts/check-unused-deps.mjs b/scripts/check-unused-deps.mjs
new file mode 100644
index 0000000..5b33b23
--- /dev/null
+++ b/scripts/check-unused-deps.mjs
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// A production dependency nobody imports is not merely clutter.
+//
+//   - It is listed in the binary LICENSE, so the release paperwork claims the
+//     artifact bundles software it does not contain. Four such packages were
+//     found by hand; two of them were in that inventory.
+//   - It sits in the graph `pnpm audit --prod` watches, so a future advisory
+//     against it blocks CI over something no operator runs.
+//   - It is installed by everyone building from source.
+//
+// PRODUCTION dependencies only, on purpose. A devDependency is legitimately
+// used by a package.json script, a binary on PATH, or a config this scan
+// cannot see, and a gate that reports those gets switched off rather than
+// obeyed. The narrow rule is the one worth enforcing: if it ships, something
+// must reference it.
+
+import { readFileSync, readdirSync, existsSync, statSync } from 'node:fs';
+import { join, extname } from 'node:path';
+
+const ROOT = new URL('..', import.meta.url).pathname;
+
+/** Workspaces whose `dependencies` are shipped and therefore checkable. */
+const WORKSPACES = ['apps/ui', 'apps/bff', 'packages/api-client', 'packages/design-tokens'];
+
+/** Text a reference can legitimately live in. `src/` is the bulk, but a build
+ *  plugin is imported by the workspace's own config — `@tresjs/core` is only
+ *  ever named in `vite.config.ts`, and reporting it would be a false alarm. */
+const CONFIG_FILES = [
+  'vite.config.ts',
+  'vitest.config.ts',
+  'eslint.config.mjs',
+  'index.html',
+  'tsconfig.json',
+  'tsconfig.app.json',
+];
+const SCANNED_EXT = new Set(['.ts', '.tsx', '.vue', '.js', '.mjs', '.cjs', '.css', '.scss', '.html', '.json']);
+
+function walk(dir, out = []) {
+  let entries;
+  try {
+    entries = readdirSync(dir, { withFileTypes: true });
+  } catch {
+    return out;
+  }
+  for (const e of entries) {
+    if (e.name === 'node_modules' || e.name === 'dist') continue;
+    const p = join(dir, e.name);
+    if (e.isDirectory()) walk(p, out);
+    else if (SCANNED_EXT.has(extname(p))) out.push(p);
+  }
+  return out;
+}
+
+/** Everything in a workspace that could name a dependency. */
+function haystack(wsDir) {
+  const files = walk(join(wsDir, 'src'));
+  for (const name of CONFIG_FILES) {
+    const p = join(wsDir, name);
+    if (existsSync(p) && statSync(p).isFile()) files.push(p);
+  }
+  return files.map((f) => readFileSync(f, 'utf8')).join('\n');
+}
+
+/** A module specifier: the exact name in quotes, optionally with a subpath.
+ *  Catches `from 'pkg'`, `import 'pkg/style.css'`, `import('pkg')`,
+ *  `require('pkg')` and CSS `@import 'pkg/x.css'` alike — and does NOT match
+ *  a longer package that merely starts with the same characters. */
+function isReferenced(text, pkg) {
+  const escaped = pkg.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
+  return new RegExp(`["'\`]${escaped}(/[^"'\`]*)?["'\`]`).test(text);
+}
+
+const findings = [];
+let checked = 0;
+
+for (const ws of WORKSPACES) {
+  const dir = join(ROOT, ws);
+  const pkgPath = join(dir, 'package.json');
+  if (!existsSync(pkgPath)) continue;
+  const deps = Object.keys(JSON.parse(readFileSync(pkgPath, 'utf8')).dependencies ?? {});
+  if (deps.length === 0) continue;
+  const text = haystack(dir);
+  for (const dep of deps) {
+    checked++;
+    if (!isReferenced(text, dep)) findings.push([ws, dep]);
+  }
+}
+
+if (findings.length > 0) {
+  console.error(`✗ ${findings.length} production dependency(ies) referenced nowhere:`);
+  for (const [ws, dep] of findings) console.error(`  ${ws}: ${dep}`);
+  console.error(
+    '\n  A shipped dependency nobody imports still enters the binary LICENSE and\n' +
+      '  the audited production graph. Remove it, or reference it where it is used.',
+  );
+  process.exit(1);
+}
+
+console.log(`✓ unused-deps OK: all ${checked} production dependencies are referenced`);
diff --git a/scripts/package.mjs b/scripts/package.mjs
index c72f232..35e048a 100644
--- a/scripts/package.mjs
+++ b/scripts/package.mjs
@@ -68,7 +68,7 @@ step('Cleaning ./dist and ./_deploy_tmp');
 rmSync(dist, { recursive: true, force: true });
 rmSync(tmp, { recursive: true, force: true });
 
-step('Building workspace packages (api-client / design-tokens / templates)');
+step('Building workspace packages (api-client / design-tokens)');
 run("pnpm -r --filter './packages/*' run build");
 
 step('Building BFF (esbuild bundle)');
diff --git a/scripts/release.sh b/scripts/release.sh
index cd701c2..7b5490f 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -178,8 +178,17 @@ check_file_has_version() {
 # Every code-side marker carries the dev-suffixed version (`-dev`) on
 # main between releases. Strip-and-tag happens later in the clone, NOT
 # in the local working tree.
+# Kept explicit rather than globbed: `test/e2e/playwright` is a workspace that
+# carries a version this release deliberately does not bump, so a glob would
+# start rewriting it. A path that no longer exists is a hard error — a deleted
+# workspace must fail HERE, not midway through a version bump.
 for pj in package.json packages/api-client/package.json packages/design-tokens/package.json \
-          packages/templates/package.json apps/bff/package.json apps/ui/package.json; do
+          apps/bff/package.json apps/ui/package.json; do
+    if [ ! -f "${PROJECT_DIR}/${pj}" ]; then
+        err "${pj} is listed for version bumping but does not exist — update the list in this script"
+        CONSISTENT=false
+        continue
+    fi
     check_file_has_version "$pj" "\"version\": \"${CURRENT_VERSION}\""
 done
 check_file_has_version "apps/bff/src/server.ts" "'${CURRENT_VERSION}'"
@@ -254,15 +263,20 @@ git checkout -b "${RELEASE_BRANCH_NAME}"
 # release-tagged commit must carry the bare semver.
 node -e "
 const fs = require('fs');
+// Must match the preflight list above. A missing path is fatal rather than
+// skipped: a half-bumped set of manifests is worse than a stopped release.
 const files = [
   'package.json',
   'packages/api-client/package.json',
   'packages/design-tokens/package.json',
-  'packages/templates/package.json',
   'apps/bff/package.json',
   'apps/ui/package.json',
 ];
 for (const f of files) {
+  if (!fs.existsSync(f)) {
+    console.error(`release.sh: ${f} is listed for version bumping but does not exist`);
+    process.exit(1);
+  }
   const j = JSON.parse(fs.readFileSync(f, 'utf8'));
   j.version = '${RELEASE_VERSION}';
   fs.writeFileSync(f, JSON.stringify(j, null, 2) + '\n');
@@ -574,15 +588,20 @@ git checkout "${RELEASE_BRANCH_NAME}"
 NEXT_DEV_VERSION="${NEXT_RELEASE_VERSION}-dev"
 node -e "
 const fs = require('fs');
+// Must match the preflight list above. A missing path is fatal rather than
+// skipped: a half-bumped set of manifests is worse than a stopped release.
 const files = [
   'package.json',
   'packages/api-client/package.json',
   'packages/design-tokens/package.json',
-  'packages/templates/package.json',
   'apps/bff/package.json',
   'apps/ui/package.json',
 ];
 for (const f of files) {
+  if (!fs.existsSync(f)) {
+    console.error(`release.sh: ${f} is listed for version bumping but does not exist`);
+    process.exit(1);
+  }
   const j = JSON.parse(fs.readFileSync(f, 'utf8'));
   j.version = '${NEXT_DEV_VERSION}';
   fs.writeFileSync(f, JSON.stringify(j, null, 2) + '\n');
diff --git a/test/e2e/CLAUDE.md b/test/e2e/CLAUDE.md
index 3f3df2d..4ed8f95 100644
--- a/test/e2e/CLAUDE.md
+++ b/test/e2e/CLAUDE.md
@@ -101,6 +101,18 @@ The reasoning is simple: if the rendered page is right, the whole chain beneath
 
 So: **assert the value on screen, not in the response.**
 
+### 3.1b The spec drives the product, it does not stand in for it
+
+The browser is the SUBJECT of the test, not a scripting host. A spec does two things: perform the actions an operator performs, and read back what the page then shows. Anything else is the spec doing the product's job and then congratulating it for the result.
+
+Three ways that line has been crossed here, each of which produced a passing test that proved nothing:
+
+- **Synthesising an event instead of clicking.** `dispatchEvent('click')` reaches the handler while saying nothing about whether anyone can hit the control — it passes on an element that is covered, zero-sized, or behind an overlay, which is the failure a click test exists to catch. When a real click genuinely cannot land (Playwright aims at the centre of a bounding box, which for a curved SVG edge is not on the path), drive the OTHER real control that reaches the same state and say so i [...]
+- **Doing the work inside `page.evaluate`.** `page.evaluate` is for reading what only the browser knows: geometry, computed style, scroll width. It is not for producing the behaviour under test. A spec that fetches from inside the page is testing its own JavaScript, and it inherits the page's CSP — one such call turned a correct `connect-src 'self'` into a red suite, which reads as a product regression and is not one.
+- **Issuing HTTP the UI never issues.** Traffic a fixture needs comes from the runner's `request` fixture or from the case's setup step, never from the page. A UI spec that opens its own request context to a backend has stopped being a UI spec.
+
+And when a spec drives something that can fail — seeding traffic, priming state — **the failure has to reach the report**. A driver whose errors are swallowed turns a broken fixture into a mystery about the product, and the spec fails somewhere far from the cause.
+
 ### 3.2 A BFF assertion needs a reason
 
 Wire-level assertions are allowed **only when the browser cannot reach the behaviour**. Before adding one, answer: *what would this catch that a UI assertion would not?*
@@ -173,9 +185,14 @@ Every upstream image is pinned by commit SHA in [`script/env`](script/env). A `l
 
 ## 7. Assert what the fixture proves, not what happens to be true
 
-An assertion should fail when the product breaks and at no other time. Two traps this suite has already hit:
+An assertion should fail when the product breaks and at no other time. The traps this suite has already hit:
 
 - **pinning one value from a set** — the fixture drives more than one endpoint, so "the newest trace is `POST:/users`" turns on traffic timing, not correctness. Match against the known set instead.
 - **asserting a healthy state that is not the only healthy state** — "every template row is synced" was permanently false on a working system, because most rows are legitimately `remote-only`. Name the states that mean *breakage* instead.
+- **asserting something that was already on screen** — after picking an entity, the entity's name is also in the picker LIST, which renders before anything is picked; after opening a trace, the service name is also in the layer header. Both assertions passed whether or not the click did anything. Scope the assertion to what the action CHANGED: the selected row, the opened panel, the fetched detail.
+- **accepting a class that several states share** — a widget body renders `.muted` for its query error, for a transient `loading…`, and for a genuine `no data`. "Content or an empty state" therefore accepted a widget whose query FAILED, which is the one outcome it existed to reject. Match the text, not the class, and let the error text through into the failure message.
+- **treating unlike things alike** — the deployment Flows table groups edges per role-pair, and the pairs are not equivalent: `liaison → data` carries every write the cluster serves, while `lifecycle → data` declares only migration metrics and is legitimately empty where no lifecycle migration is configured. A loop that took the first row rendering anything could settle on the correctly-empty pair and conclude nothing. Name the pair the fixture guarantees, and let the other one be empty.
+- **proving an absence with a selector that never matched** — `toHaveCount(0)` passes just as happily against a typo as against a genuinely hidden affordance. An absence assertion needs a sibling that proves the same selector DOES match where the thing exists, or it only tests your spelling.
+- **letting a fixed wait stand in for a readiness condition** — `waitForTimeout` before measuring says nothing about whether the page rendered, and an empty page satisfies every layout assertion trivially. Wait for the element that proves there is content, then measure — and poll the measurement when it legitimately settles (a chart is briefly wider than its container between mount and first resize).
 
 When an expectation fails, the first question is whether the system is wrong or the expectation is. In this suite it has usually been the expectation.
diff --git a/test/e2e/cases/deployment/e2e.yaml b/test/e2e/cases/deployment/e2e.yaml
index bfb4f1a..c1d2d82 100644
--- a/test/e2e/cases/deployment/e2e.yaml
+++ b/test/e2e/cases/deployment/e2e.yaml
@@ -170,10 +170,13 @@ verify:
     #      - NON-NULL values, not a non-empty array: a series is one entry per
     #        bucket and mostly null until data lands, and Sparkline renders no
     #        `.sparkline` element at all for an all-null series;
-    #      - the metrics the panel actually DRAWS. `write` / `query` /`fwd` are
-    #        the primary rows for the liaison->data and liaison->liaison pairs.
-    #        Accepting any key let the check open on `bytes` or `err` while every
-    #        rendered row was still empty.
+    #      - the metrics the panel actually DRAWS, for the PAIR the spec opens.
+    #        `write` / `query` are the primary rows of liaison->data, which is
+    #        the pair the browser case selects and the only one this fixture
+    #        guarantees traffic for. Accepting any key let the check open on
+    #        `bytes` or `err` while every rendered row was still empty; also
+    #        accepting `fwd` let it open on liaison->liaison, a different pair
+    #        from the one on screen.
     - query: |
         bash test/e2e/script/prepare/horizon-get.sh \
           "http://${service_horizon_host}:${service_horizon_8081}" \
@@ -181,7 +184,7 @@ verify:
             swctl --display json --base-url=http://${service_skywalking_oap_host}:${service_skywalking_oap_12800}/graphql \
               service ls | yq e '.[] | select(.name == "e2e-banyandb") | .id' - \
           )" \
-          | yq -P '{"hasEdgeSeries": ([.calls[]? | (.clientMetricSeries // {}) | to_entries[]? | select(.key == "write" or .key == "query" or .key == "fwd") | .value // [] | map(select(. != null)) | select(length > 0)] | length > 0)}'
+          | yq -P '{"hasEdgeSeries": ([.calls[]? | (.clientMetricSeries // {}) | to_entries[]? | select(.key == "write" or .key == "query") | .value // [] | map(select(. != null)) | select(length > 0)] | length > 0)}'
       expected: expected/has-edge-series.yml
 
     # 4. The browser half — the actual test.
diff --git a/test/e2e/playwright/playwright.config.ts b/test/e2e/playwright/playwright.config.ts
index ba5567c..8241d99 100644
--- a/test/e2e/playwright/playwright.config.ts
+++ b/test/e2e/playwright/playwright.config.ts
@@ -59,6 +59,10 @@ export default defineConfig({
   // A retry masks exactly the flake class this suite exists to catch, so the
   // answer to an intermittent failure is a better wait, not a rerun.
   retries: 0,
+  // Playwright's default is false and is NOT implied by CI, so a committed
+  // `test.only` would run one test, report the project green, and hand
+  // infra-e2e `passed: true` — a whole case silently reduced to nothing.
+  forbidOnly: true,
   // Output goes to stderr (see script/prepare/playwright.sh) — stdout is the
   // infra-e2e contract. The HTML report is for the CI failure artifact.
   reporter: [
diff --git a/test/e2e/playwright/specs/admin/pages.spec.ts b/test/e2e/playwright/specs/admin/pages.spec.ts
index 96a3086..4ad1b37 100644
--- a/test/e2e/playwright/specs/admin/pages.spec.ts
+++ b/test/e2e/playwright/specs/admin/pages.spec.ts
@@ -16,6 +16,7 @@
  */
 
 import { test, expect } from '../support/diagnostics.js';
+import { LAYER } from '../fixture.js';
 
 // The admin screens, in a real browser. Everything the `admin` case asserts
 // over the wire says nothing about whether an operator can see it: these are
@@ -49,8 +50,15 @@ test('the capture history page mounts with its per-catalog filters', async ({ pa
   // rather than content the wire cases created. Populating it would mean
   // driving a capture through the debugger UI, which would race the wire
   // cases' mutations.
-  const filters = page.locator('.dh button');
-  expect(await filters.count()).toBeGreaterThan(2);
+  // The catalog chips BY NAME, in order. `.dh button` also matches "clear
+  // all", so a count alone was satisfied by a page that rendered its header
+  // and no filter row at all — the one thing this asserts.
+  await expect(page.locator('.dh__filterchip')).toHaveText([
+    /^all\b/,
+    /^mal\b/,
+    /^lal\b/,
+    /^oal\b/,
+  ]);
 
   expect(pageErrors).toEqual([]);
 });
@@ -84,15 +92,30 @@ test('the layer dashboard admin mounts', async ({ page, pageErrors }) => {
   await page.goto('/admin/layer-dashboards');
   await expect(page.locator('#app')).toBeVisible();
 
-  // templates.mode is live, so this page renders what OAP holds. Layer keys
-  // are enum values rendered verbatim in every locale, which makes them safe
-  // to match; an empty rail would mean the seed-and-read round trip failed,
-  // the same break the wire assertions catch from the other side.
-  // Several, not an exact count: the rail is paged, so pinning the number
-  // would make an unrelated layer being added or removed fail this test.
-  const layerKeys = page.locator('code');
-  await expect(layerKeys.first()).toBeVisible({ timeout: 45_000 });
-  expect(await layerKeys.count()).toBeGreaterThan(2);
+  // templates.mode is live, so this page renders what OAP holds, and the layer
+  // roster is what proves the seed-and-read round trip.
+  //
+  // The roster is behind a click. The page mounts with its layer list
+  // COLLAPSED and opens on whichever template sorts first, so on load the only
+  // layer key in the DOM is that one — a locator over the page at large finds
+  // one row and says nothing about the roster. Opening the switcher is the
+  // operator's own path to it.
+  const switcher = page.locator('.layer-dd-btn');
+  await expect(switcher).toBeVisible({ timeout: 45_000 });
+  await switcher.click();
+
+  const rows = page.locator('.layer-dd-list .layer-row');
+  await expect(rows.first()).toBeVisible({ timeout: 45_000 });
+  // Several, not an exact count: pinning the number would make an unrelated
+  // layer being added or removed fail this test. The fixture's OWN layer is
+  // named, though — that is the row whose absence means the round trip broke.
+  // Layer keys are enum values rendered verbatim in every locale, which is
+  // what makes them safe to match on.
+  expect(await rows.count()).toBeGreaterThan(2);
+  await expect(
+    rows.locator('.key-tag').filter({ hasText: new RegExp(`^${LAYER}$`, 'i') }),
+    `the ${LAYER} template did not come back from OAP`,
+  ).toHaveCount(1);
 
   expect(pageErrors).toEqual([]);
 });
diff --git a/test/e2e/playwright/specs/deployment/banyandb.spec.ts b/test/e2e/playwright/specs/deployment/banyandb.spec.ts
index 7b9064c..618b0b2 100644
--- a/test/e2e/playwright/specs/deployment/banyandb.spec.ts
+++ b/test/e2e/playwright/specs/deployment/banyandb.spec.ts
@@ -102,35 +102,49 @@ test('clicking a deployment edge opens its client/server sparklines', async ({
     timeout: 60_000,
   });
 
-  // EVERY edge, not the first one: which edge carries traffic depends on
-  // where writes landed, and it differs between runs.
-  //
-  // `dispatchEvent` rather than `click`: the edge is an SVG `<g>` whose
-  // visible geometry is a thin stroke, so Playwright's centre-point
-  // actionability check lands on whatever is behind it and waits forever.
-  // The handler is bound to the `<g>` itself, so dispatching reaches it.
-  const count = await edges.count();
-  let rows = 0;
-  for (let i = 0; i < count && rows === 0; i += 1) {
-    await edges.nth(i).dispatchEvent('click');
-    await expect(page.locator('.ip-edge-rows').first()).toBeVisible({ timeout: 60_000 });
-    rows = await page.locator('.ip-edge-rows .ip-edge-row').count();
-  }
-
-  // The ROWS are what this proves: one per metric id the template declares
-  // for the pair, pairing `lineClient` (measured at the caller) with
-  // `lineServer` (measured at the callee). That is the edge configuration
-  // reaching the panel.
-  //
-  // The Sparkline itself is deliberately NOT asserted. It renders no
-  // `.sparkline` element for an all-null series, and on a cluster minutes old
-  // the relation metrics are still sparse — the readiness check ahead of this
-  // sees values through the same endpoint the page uses, yet the rendered
-  // rows are frequently still `—`. Requiring a drawn chart here made the case
-  // fail on a healthy fixture, which is exactly what §7 warns against. What
-  // is missing is a fixture that GUARANTEES sustained liaison<->data traffic,
-  // not a stricter assertion.
-  expect(rows, `no edge of ${count} rendered its metric rows`).toBeGreaterThan(0);
+  // Selected through the Flows table rather than by clicking the drawn edge.
+  // The graph gives an edge a 14px transparent hit path, so an operator can
+  // click it — but Playwright aims at the centre of the `<g>`'s bounding box,
+  // which for a curved edge is not on the path. Synthesising the event with
+  // `dispatchEvent` would reach the handler while proving nothing about
+  // whether anyone can actually hit it, so the test drives the other real
+  // control instead: a Flows row selects the same edge and returns to the
+  // topology tab, which is the operator's second route to this panel.
+  await page.getByRole('button', { name: 'Flows' }).click();
+
+  // The liaison -> data pair BY NAME, not whichever row comes first. Flows are
+  // grouped per role-pair, and the pairs are not equivalent: liaison -> data
+  // carries every write and query the cluster serves, so it must have data.
+  // lifecycle -> data declares only migration metrics, and this fixture
+  // configures no lifecycle migration — an empty panel there is CORRECT, and
+  // taking the first row that rendered anything let the case settle on it and
+  // conclude nothing.
+  const pair = page.locator('.sit-flow-group').filter({
+    has: page.locator('.fg-pair', { hasText: 'liaison → data' }),
+  });
+  await expect(pair, 'no liaison -> data flow group — single-role cluster?').toBeVisible({
+    timeout: 60_000,
+  });
+  const flowRows = pair.locator('tbody tr');
+  await expect(flowRows.first()).toBeVisible({ timeout: 60_000 });
+  await flowRows.first().click();
+
+  // The ROWS are the edge configuration reaching the panel: one per metric id
+  // the template declares for the pair, pairing `lineClient` (measured at the
+  // caller) with `lineServer` (measured at the callee).
+  await expect(page.locator('.ip-edge-rows').first()).toBeVisible({ timeout: 60_000 });
+  await expect(page.locator('.ip-edge-rows .ip-edge-row').first()).toBeVisible();
+
+  // And a DRAWN chart, not just the row. Sparkline renders `.sparkline` only
+  // when the series has a non-null point and `.sparkline-empty` otherwise, so
+  // asserting the rows alone passed on a panel of em dashes. The readiness
+  // check ahead of this proves the same pair's `write` / `query` series
+  // through the endpoint the page reads, so an empty chart here is a defect,
+  // not a cold cluster.
+  await expect(
+    page.locator('.ip-edge-rows .sparkline').first(),
+    'the liaison -> data edge rendered no sparkline — the panel drew em dashes for a pair that carries every write',
+  ).toBeVisible({ timeout: 60_000 });
 
   expect(pageErrors, 'an uncaught error during mount blanks the page').toEqual([]);
 });
diff --git a/test/e2e/playwright/specs/deployment/mal-debug.spec.ts b/test/e2e/playwright/specs/deployment/mal-debug.spec.ts
index f28239f..b8368cb 100644
--- a/test/e2e/playwright/specs/deployment/mal-debug.spec.ts
+++ b/test/e2e/playwright/specs/deployment/mal-debug.spec.ts
@@ -69,6 +69,9 @@ test('the MAL debugger samples the collector metrics', async ({ page, pageErrors
   // nothing, so asserting the page or the session state would pass on a
   // debugger that samples and shows nothing.
   await expect(page.locator('.mal__records').first()).toBeVisible({ timeout: 240_000 });
+  // The container is the `v-else` of that empty state, so it already implies a
+  // record exists — but a card that fails to render leaves it standing empty.
+  await expect(page.locator('.mal__rec').first()).toBeVisible({ timeout: 45_000 });
 
   expect(pageErrors, 'an uncaught error during mount blanks the page').toEqual([]);
 });
diff --git a/test/e2e/playwright/specs/es/trace-v1.spec.ts b/test/e2e/playwright/specs/es/trace-v1.spec.ts
index dcf8154..602cbce 100644
--- a/test/e2e/playwright/specs/es/trace-v1.spec.ts
+++ b/test/e2e/playwright/specs/es/trace-v1.spec.ts
@@ -63,7 +63,18 @@ test('a v1 row is a segment that opens to its full trace', async ({ page, pageEr
   // than already being inline as on v2. This interaction exists only on a
   // pre-v2 backend.
   await rows.first().click();
-  await expect(page.getByText('e2e-service-provider').first()).toBeVisible({ timeout: 45_000 });
+
+  // Scoped to the detail panel, not the page. `getByText('e2e-service-provider')`
+  // matched the layer header's service selector, which is on screen BEFORE the
+  // click — so the assertion passed whether or not the segment ever opened,
+  // which is the one thing this test exists to prove. The sibling v2 spec uses
+  // `.tr-detail` for the same reason.
+  const detail = page.locator('.tr-detail');
+  await expect(detail).toBeVisible({ timeout: 45_000 });
+  // The fetched trace, not the row: a segment row carries no spans until the
+  // full trace is loaded on open, so a waterfall row is what proves the fetch
+  // happened rather than the panel merely opening on the row it already had.
+  await expect(detail.locator('.tr-default-row').first()).toBeVisible({ timeout: 45_000 });
 
   expect(pageErrors).toEqual([]);
 });
diff --git a/test/e2e/playwright/specs/istio/mesh.spec.ts b/test/e2e/playwright/specs/istio/mesh.spec.ts
index 7190f30..c43eb40 100644
--- a/test/e2e/playwright/specs/istio/mesh.spec.ts
+++ b/test/e2e/playwright/specs/istio/mesh.spec.ts
@@ -98,10 +98,21 @@ test('the mesh_dp instance dashboard renders its card widgets', async ({ page, p
     timeout: 60_000,
   });
 
-  // The card branch collapses a window to ONE number. A card that dispatched
-  // correctly but bound nothing still carries the type class, so the number
-  // itself is what proves the branch actually rendered.
-  await expect(cards.first().locator('.card-value .num')).toBeVisible({ timeout: 60_000 });
+  // The card branch collapses a window to ONE number. Visibility of `.num` is
+  // NOT enough: that element renders unconditionally and carries an em dash
+  // when the value is null, so an entirely empty Envoy card set satisfied it.
+  // Require a digit in at least one card — the fixture drives mesh traffic, so
+  // some card must have a value; `first()` alone would pin whichever card
+  // happens to sort first, which is timing rather than correctness (§7).
+  await expect
+    .poll(
+      async () => {
+        const texts = await cards.locator('.card-value .num').allTextContents();
+        return texts.filter((t) => /\d/.test(t)).length;
+      },
+      { timeout: 60_000, message: 'every mesh_dp card rendered an em dash — the card branch bound no value' },
+    )
+    .toBeGreaterThan(0);
 
   expect(pageErrors).toEqual([]);
 });
diff --git a/test/e2e/playwright/specs/support/diagnostics.ts b/test/e2e/playwright/specs/support/diagnostics.ts
index 8cfe6ac..9965902 100644
--- a/test/e2e/playwright/specs/support/diagnostics.ts
+++ b/test/e2e/playwright/specs/support/diagnostics.ts
@@ -39,8 +39,27 @@ import { test as base, expect } from '@playwright/test';
  * and the artifact never becomes something people learn to skip.
  *
  * `pageErrors` is exposed because a blank page IS a defect: specs assert it is
- * empty after a mount. Console output deliberately is not asserted.
+ * empty after a mount.
+ *
+ * It collects from TWO sources, and the second is not optional. Vue's
+ * production build hands a component error to its own handler, which
+ * `console.error`s it — it does NOT rethrow, so `pageerror` never fires. The
+ * e2e image serves a production build, so listening to `pageerror` alone made
+ * this fixture inert against the exact failure it was written for: a
+ * ReferenceError in a view's `setup` blanks the page, and every
+ * `expect(pageErrors).toEqual([])` in the suite still passed. Verified in
+ * Chromium against Vue 3.5.40's production runtime — blank page, zero
+ * `pageerror` events, one `console.error`.
+ *
+ * Only Vue's own component-error line is promoted to a failure. General
+ * console noise (a failed third-party fetch, a deprecation warning) stays in
+ * the attached log, because a fixture that fails on any console error is one
+ * people learn to disable.
  */
+
+/** Vue's production error handler prefixes component errors with this. */
+const VUE_COMPONENT_ERROR = /^\[Vue warn\]|Unhandled error during execution|^ReferenceError|^TypeError/;
+
 export const test = base.extend<{ pageErrors: string[] }>({
   pageErrors: async ({ page }, use, testInfo) => {
     const pageErrors: string[] = [];
@@ -52,6 +71,11 @@ export const test = base.extend<{ pageErrors: string[] }>({
       if (type === 'error' || type === 'warning') {
         consoleLines.push(`[${type}] ${msg.text()}`);
       }
+      // A component that threw during setup/render reaches here, not
+      // `pageerror`, in a production build.
+      if (type === 'error' && VUE_COMPONENT_ERROR.test(msg.text().trim())) {
+        pageErrors.push(`console: ${msg.text().split('\n')[0]}`);
+      }
     });
 
     await use(pageErrors);
diff --git a/test/e2e/playwright/specs/ui/dsl-debug.spec.ts b/test/e2e/playwright/specs/ui/dsl-debug.spec.ts
index 42e64ac..7045fd5 100644
--- a/test/e2e/playwright/specs/ui/dsl-debug.spec.ts
+++ b/test/e2e/playwright/specs/ui/dsl-debug.spec.ts
@@ -77,27 +77,54 @@ async function startSampling(page: Page, filePattern: RegExp, ruleLabel?: string
   await expect(page.getByRole('button', { name: 'stop' })).toBeEnabled({ timeout: 45_000 });
 }
 
-test('the LAL debugger samples logs driven while it is live', async ({ page, pageErrors }) => {
+test('the LAL debugger samples logs driven while it is live', async ({ page, pageErrors, request }) => {
   test.setTimeout(300_000);
   await page.goto('/operate/live-debug/lal');
   await startSampling(page, /horizon-e2e/);
 
-  // Logs only exist while something emits them. The demo provider is on the
-  // same compose network as this browser, so the page can drive its
-  // log-emitting endpoint from inside the session — which is also the honest
-  // shape of the test: records must flow THROUGH the rule while sampling.
-  const drive = page.evaluate(async () => {
+  // Logs only exist while something emits them, so the provider's log-emitting
+  // endpoint is driven concurrently with sampling — records must flow THROUGH
+  // the rule while it is live, which is the whole point of the test.
+  //
+  // Driven from the RUNNER, not from inside the page. Horizon serves
+  // `connect-src 'self'`, so a page-side `fetch` to another origin is refused
+  // by the browser before it leaves — correctly: a console page has no
+  // business calling a third host, and that directive is what would stop an
+  // exfiltration attempt. The runner's container is on the same compose
+  // network and reaches the provider by name, so this drives the same traffic
+  // without asking the product to be less strict than it ships.
+  // Individual attempts may fail while the provider warms up, so a single
+  // error must not end the run — but a driver that swallows EVERY failure
+  // turns "the provider was unreachable" into a 240-second UI timeout that
+  // reads as a product bug. Count the ones that landed and keep the last
+  // error, so the assertion below can say which of the two happened.
+  let delivered = 0;
+  let lastDriveError = '';
+  const drive = (async () => {
     for (let i = 0; i < 40; i += 1) {
       try {
-        await fetch('http://provider:9090/logs/trigger', { mode: 'no-cors' });
-      } catch {
-        /* the page is cross-origin to the provider; the request still lands */
+        const res = await request.get('http://provider:9090/logs/trigger', { timeout: 5_000 });
+        if (res.ok()) delivered += 1;
+        else lastDriveError = `HTTP ${res.status()}`;
+      } catch (e) {
+        lastDriveError = e instanceof Error ? e.message : String(e);
       }
       await new Promise((r) => setTimeout(r, 1_500));
     }
-  });
+  })();
 
-  await expect(page.locator('.lal__matrixblock').first()).toBeVisible({ timeout: 240_000 });
+  // The counters are only meaningful once the wait has finished, so the
+  // diagnosis is attached on the way out. This re-throws — it never swallows
+  // the failure — it just says which of the two things went wrong.
+  try {
+    await expect(page.locator('.lal__matrixblock').first()).toBeVisible({ timeout: 240_000 });
+  } catch (err) {
+    const cause =
+      delivered === 0
+        ? `no log-trigger request reached the provider (last error: ${lastDriveError || 'none recorded'}) — the fixture never emitted logs, so this is a fixture failure, not a UI one`
+        : `${delivered} log-trigger request(s) landed, so logs were emitted and the LAL matrix still never rendered`;
+    throw new Error(`${cause}\n\n${err instanceof Error ? err.message : String(err)}`);
+  }
   await drive.catch(() => undefined);
 
   // The panel's search filters the captured records by their CONTENT — the
diff --git a/test/e2e/playwright/specs/ui/entities.spec.ts b/test/e2e/playwright/specs/ui/entities.spec.ts
index 8e79e57..3e9d158 100644
--- a/test/e2e/playwright/specs/ui/entities.spec.ts
+++ b/test/e2e/playwright/specs/ui/entities.spec.ts
@@ -16,11 +16,17 @@
  */
 
 import { test, expect } from '../support/diagnostics.js';
-import { LAYER } from '../fixture.js';
+import { DEMO_ENDPOINTS, LAYER } from '../fixture.js';
 
 // The tabs below the service dashboard, and the alarms page. Each is a
 // separate render path over data the core fixture already produces.
 
+// Which endpoint a picker auto-selects depends on traffic timing, not on
+// correctness — the fixture drives more than one. Match the known set (§7).
+const AN_ENDPOINT = new RegExp(
+  DEMO_ENDPOINTS.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|'),
+);
+
 test('the instance tab renders a dashboard for a real instance', async ({ page, pageErrors }) => {
 
   await page.goto(`/layer/${LAYER}/instance`);
@@ -31,7 +37,14 @@ test('the instance tab renders a dashboard for a real instance', async ({ page,
   // returns empty rather than erroring.
   const widgets = page.locator('.widget');
   await expect(widgets.first()).toBeVisible({ timeout: 45_000 });
-  await expect(page.getByText('provider1').first()).toBeVisible({ timeout: 45_000 });
+  // `.ib-row.on` is the PICKED row. Matching the name anywhere on the page
+  // matched the picker's list, which renders every instance before one is
+  // selected — so the assertion passed whether or not an entity resolved,
+  // which is the thing it exists to prove.
+  await expect(page.locator('.ib-row.on')).toContainText('provider1', { timeout: 45_000 });
+  // And the grid drew something for it: a resolved entity with 68 empty tiles
+  // is the exact symptom of the wrong-scope query described above.
+  await expect(page.locator('.widget .time-chart').first()).toBeVisible({ timeout: 45_000 });
 
   expect(pageErrors).toEqual([]);
 });
@@ -42,7 +55,9 @@ test('the endpoint tab renders a dashboard for a real endpoint', async ({ page,
 
   const widgets = page.locator('.widget');
   await expect(widgets.first()).toBeVisible({ timeout: 45_000 });
-  await expect(page.getByText('POST:/users').first()).toBeVisible({ timeout: 45_000 });
+  // Scoped to the picked row for the same reason as the instance tab.
+  await expect(page.locator('.ib-row.on')).toContainText(AN_ENDPOINT, { timeout: 45_000 });
+  await expect(page.locator('.widget .time-chart').first()).toBeVisible({ timeout: 45_000 });
 
   expect(pageErrors).toEqual([]);
 });
@@ -51,10 +66,12 @@ test('the API dependency tab mounts and resolves an endpoint', async ({ page, pa
 
   await page.goto(`/layer/${LAYER}/dependency`);
   await expect(page.locator('#app')).toBeVisible();
-  // The demo app's endpoint reaching this view proves the endpoint scope
+  // The demo app's endpoint being SELECTED here proves the endpoint scope
   // resolved; the dependency graph itself needs a second endpoint to be
-  // interesting, which this fixture does not produce.
-  await expect(page.getByText('POST:/users').first()).toBeVisible({ timeout: 45_000 });
+  // interesting, which this fixture does not produce. `.ep-row.on` is this
+  // view's picked row — matching the name anywhere matched the list, which
+  // renders before anything is picked.
+  await expect(page.locator('.ep-row.on')).toContainText(AN_ENDPOINT, { timeout: 45_000 });
 
   expect(pageErrors).toEqual([]);
 });
diff --git a/test/e2e/playwright/specs/ui/layout.spec.ts b/test/e2e/playwright/specs/ui/layout.spec.ts
index 1c41380..113a862 100644
--- a/test/e2e/playwright/specs/ui/layout.spec.ts
+++ b/test/e2e/playwright/specs/ui/layout.spec.ts
@@ -15,7 +15,8 @@
  * limitations under the License.
  */
 
-import { test, expect, type Locator } from '@playwright/test';
+import type { Locator } from '@playwright/test';
+import { test, expect } from '../support/diagnostics.js';
 import { LAYER } from '../fixture.js';
 
 // Layout failures the content assertions are blind to: a collapsed widget
@@ -55,15 +56,38 @@ test('the dashboard widget grid tiles rather than collapsing', async ({ page })
   expect(topRow.length, 'widgets stacked vertically instead of tiling').toBeGreaterThan(1);
 });
 
+// Each path names the element that proves the page has CONTENT to overflow
+// with. An empty shell never overflows, so measuring before the content
+// arrives reports 0 and passes for the wrong reason — which is what a fixed
+// sleep bought here.
+const RENDERED: [string, string][] = [
+  [`/layer/${LAYER}/service`, '.widget'],
+  [`/layer/${LAYER}/topology`, '.sm-node'],
+  // `/` is the landing cascade, which resolves to whichever dashboard is
+  // available — an overview on this fixture, a layer dashboard elsewhere.
+  ['/', '.sw-card.tile, .widget'],
+];
+
 test('no page scrolls sideways', async ({ page }) => {
-  for (const path of [`/layer/${LAYER}/service`, `/layer/${LAYER}/topology`, '/']) {
+  for (const [path, ready] of RENDERED) {
     await page.goto(path);
-    await page.waitForTimeout(2500);
+    await expect(page.locator(ready).first()).toBeVisible({ timeout: 45_000 });
+
     // Horizontal overflow means something refuses to shrink — a table with a
     // minimum width, or a chart sized in absolute pixels.
-    const overflow = await page.evaluate(
-      () => document.documentElement.scrollWidth - document.documentElement.clientWidth,
-    );
-    expect(overflow, `${path} overflows horizontally by ${overflow}px`).toBeLessThanOrEqual(1);
+    //
+    // Polled rather than measured once: a chart is briefly wider than its
+    // container between mount and the first resize, and that transient is not
+    // the defect. What matters is where it SETTLES, so a run that never
+    // settles fails on the last value read.
+    await expect
+      .poll(
+        async () =>
+          page.evaluate(
+            () => document.documentElement.scrollWidth - document.documentElement.clientWidth,
+          ),
+        { timeout: 30_000, message: `${path} still overflows horizontally` },
+      )
+      .toBeLessThanOrEqual(1);
   }
 });
diff --git a/test/e2e/playwright/specs/ui/overview-metric-widget.spec.ts b/test/e2e/playwright/specs/ui/overview-metric-widget.spec.ts
index 0623838..5006f99 100644
--- a/test/e2e/playwright/specs/ui/overview-metric-widget.spec.ts
+++ b/test/e2e/playwright/specs/ui/overview-metric-widget.spec.ts
@@ -90,8 +90,10 @@ test('a metric widget can be authored, pushed, and renders its value', async ({
 
   const mqe = page.locator('input.mqe-inline').first();
   await expect(mqe).toBeVisible({ timeout: 45_000 });
+  // No synthetic blur: the input commits on every real input event, and
+  // clicking Save moves focus the way an operator would anyway. Blurring
+  // programmatically would hide a component that only committed on blur.
   await mqe.fill('sum(top_n(service_cpm,{{topn}},DES))');
-  await mqe.blur();
 
   // Local draft first, then publish — the flow the docs describe.
   await page.getByRole('button', { name: 'save (local)' }).click();
diff --git a/test/e2e/playwright/specs/ui/overview.spec.ts b/test/e2e/playwright/specs/ui/overview.spec.ts
index c0f4619..994107b 100644
--- a/test/e2e/playwright/specs/ui/overview.spec.ts
+++ b/test/e2e/playwright/specs/ui/overview.spec.ts
@@ -37,7 +37,15 @@ test('the services overview renders its widget vocabulary', async ({ page, pageE
   const tiles = page.locator('.sw-card.tile');
   await expect(tiles.first()).toBeVisible({ timeout: 45_000 });
   await expect.poll(async () => tiles.count(), { timeout: 45_000 }).toBeGreaterThan(1);
-  await expect(tiles.first().locator('.count')).toBeVisible();
+  // `.count` renders "—" when the value is null, so its visibility is
+  // satisfied by an overview that resolved nothing. The fixture drives traffic
+  // through general, so at least one KPI tile must carry a digit.
+  await expect
+    .poll(
+      async () => (await tiles.locator('.count').allTextContents()).filter((t) => /\d/.test(t)).length,
+      { timeout: 60_000, message: 'every KPI tile rendered an em dash — the overview bound no values' },
+    )
+    .toBeGreaterThan(0);
 
   // Section breaks are layout, not data — they render regardless of what OAP
   // answers, so their absence means the template never reached the renderer.
diff --git a/test/e2e/playwright/specs/ui/shell.spec.ts b/test/e2e/playwright/specs/ui/shell.spec.ts
index c1b2ede..bd31fcc 100644
--- a/test/e2e/playwright/specs/ui/shell.spec.ts
+++ b/test/e2e/playwright/specs/ui/shell.spec.ts
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-import { request } from '@playwright/test';
 import { test, expect } from '../support/diagnostics.js';
 
 // A blank page with a console error is the failure mode this file exists for:
@@ -59,13 +58,13 @@ test('wrong credentials keep the operator on the login form', async ({ browser }
   await ctx.close();
 });
 
-test('a deep link resolves to a rendered route, not a 404', async ({ page, baseURL }) => {
-  // The SPA fallback serving index.html is a BFF concern; the route actually
-  // resolving to a component is a router concern. Both, in one hop.
-  const anon = await request.newContext({ baseURL, storageState: { cookies: [], origins: [] } });
-  expect((await anon.get('/layer/general/trace')).status()).toBe(200);
-  await anon.dispose();
-
+test('a deep link resolves to a rendered route, not a 404', async ({ page }) => {
+  // Only the router concern is asserted here. That the SPA fallback serves
+  // index.html for an unknown path is an HTTP fact about the packaged server,
+  // and the packaged-server smoke test in CI already asserts its status code
+  // — checking it again from a browser spec proves nothing a rendered route
+  // does not, and a UI spec that issues its own HTTP request is doing
+  // something other than driving the UI.
   await page.goto('/layer/general/trace');
   await expect(page.locator('#app')).toBeVisible();
   await expect(page.locator('input[name="password"]')).toHaveCount(0);
diff --git a/test/e2e/playwright/specs/ui/template-fidelity.spec.ts b/test/e2e/playwright/specs/ui/template-fidelity.spec.ts
index 88d517a..12fe00d 100644
--- a/test/e2e/playwright/specs/ui/template-fidelity.spec.ts
+++ b/test/e2e/playwright/specs/ui/template-fidelity.spec.ts
@@ -100,8 +100,17 @@ const RENDERED_AS: Record<string, string> = {
  */
 const FIXTURE_GUARANTEES_DATA = new Set(['line', 'top']);
 
-/** How a widget says "I have nothing to show" — a legitimate outcome. */
+/**
+ * How a widget says "I have nothing to show" — a legitimate outcome.
+ *
+ * The class alone is NOT the signal. A widget body renders `.muted` for three
+ * different outcomes: the query's error message, a transient `loading…`, and
+ * the genuine `no data`. Accepting the class accepted all three, so a widget
+ * whose query FAILED — the one outcome this assertion exists to reject —
+ * counted as a legitimate empty state. The text is what separates them.
+ */
 const EMPTY_STATE = '.muted, .empty';
+const NO_DATA = /^no data$/i;
 
 async function assertScopeMatchesTemplate(page: Page, scope: string, path: string) {
   const declared = unconditional(widgetsOf(LAYER, scope));
@@ -143,12 +152,39 @@ async function assertScopeMatchesTemplate(page: Page, scope: string, path: strin
           `widget "${w.title}" (${w.type}) carries the type class but rendered nothing`,
         ).toBeVisible();
       } else {
-        // Content OR an explicit empty state — never neither. This still
-        // catches a branch that fell through and drew nothing.
-        await expect(
-          tile.locator(`${proof}, ${EMPTY_STATE}`).first(),
-          `widget "${w.title}" (${w.type}) rendered neither content nor an empty state`,
-        ).toBeVisible();
+        // Content OR an explicit "no data" — never neither, and never an
+        // error. The widget's own error text is returned rather than swallowed
+        // so the failure names the OAP problem instead of just the tile.
+        const body = tile.locator('.w-body');
+        await expect
+          .poll(
+            async () => {
+              if (
+                await body
+                  .locator(proof)
+                  .first()
+                  .isVisible()
+                  .catch(() => false)
+              ) {
+                return 'content';
+              }
+              const text =
+                (
+                  await body
+                    .locator(EMPTY_STATE)
+                    .first()
+                    .textContent()
+                    .catch(() => null)
+                )?.trim() ?? '';
+              if (NO_DATA.test(text)) return 'no data';
+              return text === '' ? 'nothing rendered' : text;
+            },
+            {
+              timeout: 45_000,
+              message: `widget "${w.title}" (${w.type}) rendered neither content nor "no data"`,
+            },
+          )
+          .toMatch(/^(content|no data)$/);
       }
     }
 
@@ -193,28 +229,77 @@ test('the instance dashboard renders exactly what its template declares', async
   // scope mix-up renders 68 correctly-shaped empty tiles.
   test.slow();
   await assertScopeMatchesTemplate(page, 'instance', `/layer/${LAYER}/instance`);
+
+  // `unconditional()` excludes every `visibleWhen` widget from the checks
+  // above, which on this scope is 71 of 74 — so without the next assertion the
+  // richest scope in the product proves three tiles, and the runtime gating
+  // itself is verified nowhere.
+  //
+  // The gate is asserted DIRECTIONALLY rather than by pinning a metric: the
+  // fixture's instance runs a Java agent, so widgets gated on a `jvm_*` metric
+  // belong on this page and widgets gated on a `nodejs_*` one do not. That
+  // catches a gate stuck open (every runtime's widgets render) and a gate
+  // stuck shut (none do), without depending on which JVM metric has landed by
+  // the time the page loads — which §7 warns is timing, not correctness.
+  const gated = widgetsOf(LAYER, 'instance').filter((w) => w.visibleWhen !== undefined);
+  const titlesFor = (family: RegExp): string[] =>
+    gated
+      .filter((w) => family.test(JSON.stringify(w.visibleWhen)))
+      .map((w) => w.title)
+      .filter((t): t is string => typeof t === 'string' && t.length > 0);
+
+  const jvmTitles = titlesFor(/jvm/i);
+  const nodeTitles = titlesFor(/nodejs/i);
+  expect(jvmTitles.length, 'the instance template no longer declares JVM-gated widgets').toBeGreaterThan(0);
+  expect(nodeTitles.length, 'the instance template no longer declares Node.js-gated widgets').toBeGreaterThan(0);
+
+  const shown = async (titles: string[]): Promise<number> => {
+    let n = 0;
+    for (const t of titles) if (await page.getByText(t, { exact: true }).count()) n += 1;
+    return n;
+  };
+  expect(
+    await shown(jvmTitles),
+    'no JVM-gated widget rendered for a Java instance — the visibleWhen gate is stuck shut',
+  ).toBeGreaterThan(0);
+  expect(
+    await shown(nodeTitles),
+    'a Node.js-gated widget rendered for a Java instance — the visibleWhen gate is stuck open',
+  ).toBe(0);
+
   expect(pageErrors).toEqual([]);
 });
 
-test('every declared graph form is covered by this fixture', async () => {
-  // A guard on the SPEC, not the product. If a bundled template starts using
-  // a form the fixture never renders, the assertions above quietly stop
-  // covering it — this fails instead, so the gap is a decision rather than an
-  // accident.
+// A guard on the SPEC, not the product — so it is NOT a test. Every case here
+// costs a browser and a full OAP + BanyanDB stack, and this needs neither: it
+// reads two JSON files. It runs at module load, so an uncovered widget form
+// fails the whole file immediately rather than posing as a passing e2e case.
+//
+// What it protects: if a bundled template starts using a form the fixture
+// never renders, the assertions above quietly stop covering it. This turns
+// that into a decision rather than an accident.
+{
   const covered = new Set(
     ['service', 'endpoint', 'instance']
       .flatMap((scope) => unconditional(widgetsOf(LAYER, scope)))
       .map((w) => w.type),
   );
   for (const type of covered) {
-    expect(RENDERED_AS[type], `no rendered-proof defined for widget type "${type}"`).toBeTruthy();
+    if (!RENDERED_AS[type]) {
+      throw new Error(
+        `template-fidelity: no rendered-proof defined for widget type "${type}" — add one to RENDERED_AS or the assertions silently stop covering it`,
+      );
+    }
   }
   // `card` and `table` are not reachable from this fixture: general declares
   // neither. They live in the Kubernetes layers — k8s.service carries 8 card
   // and 6 table widgets, k8s_service 2 more tables — so coverage arrives with
   // the planned k8s monitoring case, which shares its cluster fixture with
-  // the istio / rover work. Until then this guard keeps the omission visible
-  // rather than letting it pass as covered.
-  expect(covered.has('line')).toBe(true);
-  expect(covered.has('top')).toBe(true);
-});
+  // the istio / rover work. Until then this keeps the omission visible rather
+  // than letting it pass as covered.
+  for (const form of ['line', 'top']) {
+    if (!covered.has(form)) {
+      throw new Error(`template-fidelity: the fixture no longer renders any "${form}" widget`);
+    }
+  }
+}