Files
buzz/desktop
HaytandWill Pfleger 227d576baf fix(desktop): validate full NIP-98 probe invariant before authorizing
The probe accepted every structurally deserializable 2xx as
Nip98Authorized and forwarded whatever role/source strings arrived,
without requiring status == "ok", authMode == "nip98", a recognized
non-null role/source, canAct == true, or canStaff == (role == operator).
A token-mode, error-status, or role/capability-mismatched body reaching
the authenticated retry authorized the console and could expose Staffing
against a relay that denied it — a fail-open network-boundary
classification. The unauthenticated 200 branch matched authMode alone.

Add typed ProbeRole/ProbeSource enums (closed vocabularies) and two
validators on ProbeWire: authorized_principal returns the typed
principal only when the complete nip98 invariant holds; is_coherent_disabled
gates the disabled branch on the full disabled-mode shape. Both call
sites fail closed to NotAdminApi otherwise. parse_probe stays pure
structural deserialization with Serde's unknown-field tolerance for
forward compatibility.

Route FeedbackStatusControl mutation failures through
toast.error(adminErrorMessage(e)) like the other three handlers, so a
relay error envelope no longer renders as raw JSON inline.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-13 16:14:16 -04:00
..

Buzz

Desktop chat shell with:

  • Tauri + React + TypeScript + Vite
  • Tailwind CSS
  • shadcn/ui-ready shared components
  • Biome (lint/format/check)
  • Feature-driven frontend structure

Scripts

  • pnpm dev - run the web frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm format - Biome format (write)
  • pnpm check - Biome check

Structure

  • src/shared - reusable app-wide code (ui, lib, styles)
  • src/features - feature modules (vertical slices)
  • src/app - top-level app composition