Tether icon indicating copy to clipboard operation
Tether copied to clipboard

Sensitive data in /tmp/tether.log + hardening for shared URLs and received files

Open alex1075 opened this issue 2 weeks ago • 0 comments

Hi! Thanks for Tether. I reviewed v1.9.1 (e3caa14) before installing and found a couple of things.

1. Clipboard and message content logged to /tmp/tether.log

  • TetherLog.swift:9 appends to /tmp/tether.log. It never rotates, and other local accounts can read it.
  • ClipboardPlugin.swift:53 logs the first 30 characters of every local clipboard change, even with no phone paired. ClipboardPlugin.swift:113 does the same for clipboard text from the phone. 30 characters covers most passwords and 2FA codes, and with auto-copy of sign-in codes on, every code ends up in the log.
  • Also logged in plaintext: shared text (SharePlugin.swift:312), notification replies (NotificationPlugin.swift:492) and shared URLs (SharePlugin.swift:327).

Suggested fix:

  • Log metadata only (type, length), never content.
  • Move the log to ~/Library/Logs/Tether/ with 0600 permissions, or use os_log with privacy: .private.
  • Put verbose logging behind a debug toggle.

2. Clipboard sync and password managers

Clipboard sync is on by default for each paired device (PairedDevice.swift:28), and copies from password managers get synced too. Skipping pasteboard items marked org.nspasteboard.ConcealedType or org.nspasteboard.TransientType would fix that. That's what 1Password, Bitwarden and others set.

3. Hardening: shared URLs and received files

  • Shared URLs are opened automatically, with any scheme (SharePlugin.swift:44, 323-326). Could this be limited to http/https, with an optional "ask before opening" setting?
  • Files received into ~/Downloads don't get the com.apple.quarantine attribute. Adding LSFileQuarantineEnabled (or setting the attribute explicitly) would bring Gatekeeper checks back for downloaded files.

Happy to test a build with fixes. Thanks!

alex1075 avatar Nov 19 '26 13:11 alex1075