Skip to content

Security: gal064/encryptboard

Security

docs/SECURITY.md

Encryptboard threat model

Protects against: any program running as you (malware, scripts, AI agents with shell or automation access) reading your clipboard history.

Attack Defense How to test (qa/attack.sh)
Read the history files Every file sealed with AES-GCM; master key wrapped by the Secure Enclave grep a known marker in the data folder
Read the key record from the keychain Login-keychain item trusted only by this exact ad-hoc build; any other program triggers a password prompt naming it (cancel it). Read and written only in the login keychain, opened by path, so a program can't put its own keychain first. dev mode: data-protection item visible only to the team's apps security find-generic-password, qa/rogue keychain
Use the Secure Enclave key Needs Touch ID or the login password, every unlock (only possible after the keychain read above)
Plant a known master key, swap or forge files Wrapped master lives in the keychain item; ciphertexts bound to role and item ID; only the inbox accepts public-key data, never for an existing item. Overwriting the keychain item (possible without a prompt) makes Encryptboard prompt unexpectedly at launch: deny it, that prompt is the defense. If allowed, the unlock usually fails closed (D3) —
Sign an impostor app with the app's identity Ad-hoc: there is no signing key; the identity is the code hash qa/attack.sh check 6
Ask the app for its data No CLI, URL scheme, AppleScript, XPC or Services sdef, lsof -p
Read the app's memory / inject code Hardened runtime, no get-task-allow (build script refuses otherwise) codesign -d flags and entitlements, lldb -p
Screenshot or record the panel sharingType = .none on both panels screencapture -l <window>
Read the panel through accessibility No accessibility children AppleScript entire contents, cua-driver
Fake key presses, clicks or mouse moves Events with a non-zero source process ID are dropped qa/rogue key, AppleScript keystroke
Press "Open" in the menu-bar menu via accessibility No such menu item —
Swap the public key to receive future copies Public key derived from the keychain handle, never read from disk —

Does not protect against:

  • The live clipboard. Whatever is on the clipboard right now is readable by every app; that is true without a clipboard manager. Encryptboard clears password-manager items a second after pasting them.
  • Root or kernel-level malware, or someone who has your login password and your unlocked Mac.
  • The app you paste into.
  • Tampering with settings in UserDefaults (availability only, see D13).
  • Rolling index.enc back to an older copy, or replaying old item files (brings back deleted items; the attacker still cannot read them).
  • A program you allow at a keychain prompt can read the key record and then plant its own keys (D7). The prompt's name proves nothing (a re-signed copy shows the same one): approve it only right after you ran scripts/install.sh, and deny it at any other time.
  • A fake ⇧⌘C opens the panel while history is unlocked (D8). Nothing can be read or selected that way, but a real Return you press next pastes the top item into the app in front.
  • Approving an unexpected keychain prompt after a program overwrote the key record (D3): from then on that program may read new copies.
  • dev mode only: anyone who can sign code with your Apple Development identity can build an impostor the keychain trusts. Keep that key set to ask before codesign uses it.
  • Item sizes and copy times are visible from file sizes and inbox names (D15).

Assumptions (checked by QA, results recorded below):

  1. sharingType = .none still excludes windows from ScreenCaptureKit on macOS 26. (not yet verified)
  2. Hardware events carry source process ID 0; events posted by programs carry their PID. (not yet verified with the app in front)
  3. The login-keychain item cannot be read by security or an unrelated binary without a prompt. (verified)
  4. Hardened runtime blocks lldb attach. (verified, ad-hoc build)
  5. Posted events do not set the HID key state. False: they do, and without Input Monitoring the app can't read key state at all. The check was removed (D8).

QA results

Security QA, round 2 (ad-hoc build, 2026-12-02)

Check Result
Markers (plain and concealed) in history files PASS: not found; item files start with 0x01
security CLI / unrelated binary reads key record PASS: prompt naming the reader, nothing read
Hardened runtime, no get-task-allow, lldb attach PASS: flags=0x10002(adhoc,runtime), attach refused
AppleScript dictionary, URL schemes, Services, sockets PASS: none
Impostor signing PASS: ad-hoc, no key to steal. But a modified, re-signed copy shows the same "Encryptboard wants to use…" prompt (now documented, D7)
Copy while locked PASS: inbox file sealed 0x02, no plaintext
Leaks: system logs (20 min), Spotlight, prefs, caches, open files PASS: no marker anywhere
Unrelated binary overwrites a login-keychain item (probe item) FAIL: allowed without a prompt. Mitigated by failing closed (D3, D5)
Fake ⇧⌘C with the physical-key check The check blocked it only because the app can't read key state; it would block the real hotkey too. Removed; accepted risk (D8)
Memory / CPU 17–18 MB footprint, 0.0% idle CPU
Not run Touch ID unlock, screenshots and accessibility tree with the panel open, fake Return with the app in front, restart without a prompt

Side effect: a QA probe killed while its keychain prompt was open crashed securityd and locked the login keychain. qa/attack.sh now cancels prompts instead of killing clients.

UI QA, round 2 (QA build, 2026-12-02)

Passed: capture of text, images, multiple files and concealed items (no plaintext on disk); Maccy-like layout; type-to-search; 200 ms preview with no flashing; Return, click, ⌘1–9 and ⌘ paste; ⌥P pin/unpin; ⌘⌫; 200-item limit; 20 MB cap; concealed masking and clearing; no animation; Clear History returns focus; locked capture goes to the inbox. 16 MB at launch, 0% idle CPU. Fixed after this run: about 1% of copies made 0.65 s apart were missed (now polled every 0.25 s; 40 of 40 at 0.35 s), search matched the source app of every item, and the hidden item's preview showed its byte size. Not run: Touch ID unlock, hover selection, Launch at Login.

There aren't any published security advisories