Skip to content

Instantly share code, notes, and snippets.

@lgarron
Last active October 5, 2015 00:28
Show Gist options
  • Save lgarron/2723882 to your computer and use it in GitHub Desktop.
Save lgarron/2723882 to your computer and use it in GitHub Desktop.

Clipboard Module Security (Writing to Disk)

Right now, the Clipboard Module for Quicksilver writes/caches clipboard data to disk in a few ways, e.g. here. Depending on your system, this data could grow to several megabytes and may be backed up unencrypted onto Time Machine or synced online via Dropbox. If you ever copy-and-paste complicate passwords or other sensitive data, you may consider this a significant security risk.

Hack to prevent Quicksiler from writing clipboard data to disk

  1. Set the following directories to read-only:

Directories:

/Users/lgarron/Library/Application Support/Quicksilver/Data/
/Users/lgarron/Library/Application Support/Quicksilver/Data/Clipboard/

2a. Copy an innocent piece of text. (I used "Quicksilver Blank Pasteboard".)

2b. Open the clipboard pane in Quicksilver, click the settings icon, and "Clear".

2c. Set the following file to read-only:

/Users/lgarron/Library/Application Support/Quicksilver/Shelves/QSPasteboardHistory.qsshelf

2d. Lock the file from 2c. ("Get Info" in Finder and select the checkbox for "Locked". There's also a Quicksilver action for this. In either case, don't copy anything before you're done setting it to read-only and locking it.)

The Clipboard Module will continue to work just like before, apparently storing the items in memory. When you restart Quicksilver, all the items will be gone, except for what was in QSPasteboardHistory.qsshelf before you locked it, and what's currently in your clipboard.

Caveats

Quicksilver may still store some data in /Users/lgarron/Library/Caches/Quicksilver/Indexes/ - I don't know enough to be sure either way. Also, Quicksilver still tries to write to some temp file in the same folder as QSPasteboardHistory.qsshelf, but it disappears immediately. But at least this prevents the majority of data from being stored on your hard drive in the obvious way. The best solution, of course, is to fix the module, but I don't know if I would know enough of what I'm doing, and I don't really have the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment