From 62cc705ce84d89013cadf01490879da58ea72dea Mon Sep 17 00:00:00 2001 From: hariel1985 Date: Tue, 3 Feb 2026 11:14:29 +0100 Subject: [PATCH] Security: Clear clipboard if it was empty before dictation - If clipboard was empty, clear it after paste (don't leave transcript) - If clipboard had content, restore original content - Prevents sensitive dictated text from remaining on clipboard Co-Authored-By: Claude Opus 4.5 --- macos/src/main.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/macos/src/main.swift b/macos/src/main.swift index 6de2adc..b4e6613 100644 --- a/macos/src/main.swift +++ b/macos/src/main.swift @@ -867,8 +867,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, URLSessionDownloadDelegate { keyUp?.post(tap: .cghidEventTap) // Restore original clipboard after a short delay + // If clipboard was empty, clear it (don't leave transcript) + // If clipboard had content, restore it DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { - self.restoreClipboard(savedItems) + if savedItems.isEmpty { + NSPasteboard.general.clearContents() + } else { + self.restoreClipboard(savedItems) + } } self.statusItem.button?.title = "🎤"