Skip to content

fix(cli): harden MCP transport, file writes, auth & input from review - #12

Merged
luke-speechify merged 1 commit into
mainfrom
fix/cli-review-findings
Aug 31, 2026
Merged

fix(cli): harden MCP transport, file writes, auth & input from review#12
luke-speechify merged 1 commit into
mainfrom
fix/cli-review-findings

Conversation

@luke-speechify

@luke-speechify luke-speechify commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Address the full adversarial-review findings across the CLI.

Critical
- mcp --http binds 127.0.0.1 by default (was every interface), enables DNS-
  rebinding protection, and logs the real bind host; --host opts into a wider
  interface with an explicit exposure warning.
- MCP text_to_speech / stream_text_to_speech confine outputPath to a relative
  path inside the working dir and never overwrite — no more model-driven
  arbitrary file write.

High
- logout surfaces a failed keychain delete when the key is still readable,
  instead of reporting a clean logout while the credential survives.
- say --out - refuses a TTY on the default (non-stream) route too, not only
  under --stream.
- readStdin bounds the first byte on a non-TTY pipe, so an idle inherited pipe
  (agents/CI) can't hang forever; slow producers still read to EOF untimed.

Medium
- Non-stream say no longer silently overwrites the default speech.<ext>;
  --force is accepted on both routes.
- A flag/env API key no longer inherits the stored base_url/api_version.
- mcp install --embed-key writes 0600, atomically, and warns about plaintext.
- listVoices tolerates a null models array; adds a page ceiling.
- api buildUrl preserves the base path and refuses an endpoint that resolves
  off the API host (protocol-relative Bearer leak).
- search_docs bounds every round-trip with the shared HTTP timeout.

Low / cleanup
- intArg rejects hex/scientific/padded ints; renderTable neutralizes control
  chars in untrusted cells; PowerShell playback escapes single quotes;
  --json + --agent-friendly is rejected as contradictory; api --field coerces
  typed JSON scalars; api -d - / @file send raw bytes; remove dead
  apiErrorFromResponse; correct stale v3/tool-list comments.
@luke-speechify
luke-speechify merged commit 1cf46bf into main Aug 31, 2026
@luke-speechify
luke-speechify deleted the fix/cli-review-findings branch August 31, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant