Client-side key handling and privacy notes #15

Closed
opened 2026-10-25 14:58:40 +00:00 by dsh · 1 comment
Owner

Goal

Be honest and safe about the one secret this plugin handles: a TTS API key in the browser.

Scope

  • Default: key lives in memory for the session only; "remember on this device" opt-in writes to localStorage with a clear warning.
  • Masked input, reveal-on-hold optional, "Clear key" button; key never appears in logs, error messages, URLs, telemetry, or issue templates.
  • Key is never sent to the DSH host: no settings binding, no /plugins request, no server route. Verify with DevTools network capture.
  • Privacy note in README: what leaves the browser (reply text → chosen endpoint), what stays local (models, settings, voice cache), and the XSS/shared-machine risk of storing a key.
  • Secret scan in npm run check (regex for sk-, Bearer , key-like assignments) over tracked files.
  • If the plugin is ever asked to log requests, log host + status + duration only.

Acceptance

  • With a key configured, a full turn can be spoken while the host process never sees it (verified by inspecting the DSH request log/network).
  • Clearing the key immediately disables cloud synthesis with a visible reason.
  • grep -ri 'sk-' over the repo and the pack tarball finds nothing.

Notes

  • Depends on #12, #14. Part of M2. Threat model is deliberately small: no server, so no server-side secret store.
## Goal Be honest and safe about the one secret this plugin handles: a TTS API key in the browser. ## Scope - [ ] Default: key lives in memory for the session only; "remember on this device" opt-in writes to `localStorage` with a clear warning. - [ ] Masked input, reveal-on-hold optional, "Clear key" button; key never appears in logs, error messages, URLs, telemetry, or issue templates. - [ ] Key is never sent to the DSH host: no settings binding, no `/plugins` request, no server route. Verify with DevTools network capture. - [ ] Privacy note in README: what leaves the browser (reply text → chosen endpoint), what stays local (models, settings, voice cache), and the XSS/shared-machine risk of storing a key. - [ ] Secret scan in `npm run check` (regex for `sk-`, `Bearer `, key-like assignments) over tracked files. - [ ] If the plugin is ever asked to log requests, log host + status + duration only. ## Acceptance - With a key configured, a full turn can be spoken while the host process never sees it (verified by inspecting the DSH request log/network). - Clearing the key immediately disables cloud synthesis with a visible reason. - `grep -ri 'sk-'` over the repo and the pack tarball finds nothing. ## Notes - Depends on #12, #14. Part of M2. Threat model is deliberately small: no server, so no server-side secret store.
Author
Owner

Deferred 2026-10-25 with #14: with no cloud engine in scope, there is no key to protect yet. Keep the design notes (memory-only default, opt-in persistence, secret scan) in AGENTS.md D8 / the dev-plan; reopen together with #14.

**Deferred 2026-10-25** with #14: with no cloud engine in scope, there is no key to protect yet. Keep the design notes (memory-only default, opt-in persistence, secret scan) in `AGENTS.md` D8 / the dev-plan; reopen together with #14.
dsh closed this issue 2026-10-25 16:19:59 +00:00
Sign in to join this conversation.
No description provided.