Harden IPC security, async transcription, model label display#35
Merged
lcoutodemos merged 1 commit intomainfrom Mar 20, 2026
Merged
Harden IPC security, async transcription, model label display#35lcoutodemos merged 1 commit intomainfrom
lcoutodemos merged 1 commit intomainfrom
Conversation
…play Security (from PR #12 analysis): - OPEN_IN_TERMINAL: UUID-validate sessionId, reject malicious projectPath, use single-quoted shell escaping to block $() and backtick injection - LOAD_SESSION: UUID-gate sessionId to prevent path traversal - LIST_SESSIONS/LOAD_SESSION: reject null bytes, newlines, non-absolute projectPath - OPEN_EXTERNAL: replace regex with URL constructor for protocol/hostname validation - Marketplace install/uninstall: validate pluginName charset, repo format, sourcePath traversal, and enforce resolved path stays under ~/.claude/skills/ Performance: - Replace execSync with async execFile in transcription to stop blocking the Electron main thread (eliminates macOS loading cursor during voice input) - Add per-phase timing logs for transcription diagnostics - Conditional fallback re-run: only re-transcribe if first run produced no stdout UI: - Normalize model IDs with context window hints (e.g. "[1m]") for display - Add getModelDisplayLabel helper for future-proof model name rendering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Security hardening across 5 IPC boundaries (from PR Security hardening, TS fixes, JS drag, and dynamic window resize #12 analysis — took what was right, rejected what would break reliability):
OPEN_IN_TERMINAL: UUID-validate sessionId, single-quote shell escaping to block$()and backtick injection via projectPathLOAD_SESSION: UUID-gate sessionId to prevent path traversal (../../etc/passwd.jsonl)LIST_SESSIONS/LOAD_SESSION: reject null bytes, newlines, non-absolute projectPathOPEN_EXTERNAL: replace regex withnew URL()constructor for protocol/hostname validationowner/repoformat, sourcePath traversal, andresolve()containment check ensuring paths stay under~/.claude/skills/Async transcription — replaced
execSyncwith asyncexecFilewrapper so voice transcription no longer blocks the Electron main thread (fixes macOS loading cursor / app freeze during recording)Transcription diagnostics — per-phase timing logs (
decode+write_wav,probe_binary_paths,whisperkit_transcribe_report, etc.) written to~/.clui-debug.logon every transcriptionConditional fallback — WhisperKit only re-runs transcription if first run produced empty stdout (was unconditional before, causing ~2x latency)
Model label display — normalizes model IDs with context window hints (e.g.
claude-opus-4-6[1m]→Opus 4.6 (1M)) for the status bar pickerTest plan
npm run buildcompiles cleantail -f ~/.clui-debug.logshows timing breakdown per transcriptionSecurity vectors verified
sessionId = '$(curl evil)'projectPath = '/tmp/$(touch pwned)'sessionId = '../../etc/passwd'pluginName = '../../../tmp/evil'url = 'javascript:alert(1)'