Is clipboard history safe? Passwords, API keys and what to check first
A clipboard history is a record of what you copied, and some of what you copy is secret. Whether that's safe depends on what the clipboard manager records, where it keeps it, and what you do with the rest.
What changes when you keep a history
The clipboard is shared on purpose. It exists so that one app can read what another put there. Without a history, a password you copy sits on the clipboard until your next copy and is then gone.
A history changes how long things last. The same password is now in a list, and usually in a file, for as long as the history keeps it. That could be weeks. The ways it can then reach someone else are ordinary ones:
- Someone uses your Mac while you're logged in and opens the history.
- You open the history while sharing your screen or with someone looking over your shoulder.
- The history leaves your Mac, through a sync feature or in a backup.
- Other software running under your account reads the file the history is stored in.
What you copy that shouldn't be kept
- Passwords, when you copy them instead of using autofill.
- One-time login codes from a text message or an authenticator app.
- API keys, access tokens and private keys, if you write software.
- Card numbers and bank details.
- Other people's personal information, such as a customer's address copied from one system into another.
What to check before trusting a clipboard manager
Does it connect to the internet?
Sync between devices is convenient, and it means your clipboard is stored on someone's server. An app with no sync and no account has nowhere to send your history. Read the privacy policy for what is collected, and check whether the app works with no network connection.
Where is the history stored?
Find out which folder it's in, whether other user accounts on the Mac can read it, and whether it's included in your backups. A history file is protected by the same things as your other files: your login password and, if you've turned it on, FileVault.
Does it skip what password managers mark as hidden?
Many password managers mark what they copy with a flag that asks clipboard managers not to record it. It's a convention, not something macOS enforces, so it only works if the clipboard manager respects it. Many password managers can also clear the clipboard after a short time. That doesn't remove a copy a history has already made.
Can you exclude apps?
A list of apps to never record from covers the cases the flag misses: a banking app, a remote desktop window, a database tool.
Can you pause it?
If you know you're about to handle something sensitive, the simplest protection is to stop recording for a few minutes.
How long is it kept, and can you delete it?
Look for a limit on the size or age of the history, a way to delete a single item, and a way to clear everything.
Habits that help with any clipboard manager
- Use autofill instead of copying passwords. A password that never touches the clipboard can't be recorded from it.
- Delete what slipped through. If you see a secret in your history, delete that item then, not later.
- Lock your Mac when you step away, and turn on FileVault.
How Tuck handles it
Tuck is a clipboard manager for Mac that isn't released yet; it's coming to the Mac App Store. Here is what it does with sensitive copies.
- Nothing leaves your Mac. Tuck has no account, no sync and no analytics, and it never connects to the internet. The Mac App Store version runs in Apple's App Sandbox without the permission an app needs to make network connections.
- Hidden copies are skipped. Anything a password manager marks as hidden is never recorded.
- Listed apps are skipped. Copies made while an app listed under Settings > Privacy is in front are not recorded. 1Password, Bitwarden, Keychain Access and Apple's Passwords app are on the list from the start, and you can add any app.
- Text that looks like a credential is held in memory only. It appears in the panel masked and labeled "secret, not saved". It's never written to disk, and it's forgotten after 10 minutes or when Tuck quits. Until then you can still paste it. It can't be pinned.
- The same check applies to images. Tuck reads the text in images so you can search for them. If that text looks like a credential, it isn't kept.
- You can pause. Pause Capture in the menu bar icon's menu stops recording until you turn it off again.
- You can delete. Cmd+Delete removes the selected clip, and Settings > History > Clear History removes everything except pinned clips. Tuck also keeps only the newest 1,000 clips and 200 images unless you change those limits.
- The history is private to your account. It's stored in Tuck's own folder on your Mac, and Tuck sets that folder so that only your macOS user account can read it.
What Tuck recognizes as a credential
The check looks for shapes. It recognizes API keys and tokens in the formats used by a number of common services, JSON web tokens, private key blocks, lines such as API_KEY=... or PASSWORD=... from an environment file, web addresses with a password in them, Bearer authorization headers, and a copy that is nothing but a six to eight digit code.
What it doesn't do
- It can't recognize a plain password. A password on its own has no shape to detect. If you copy one from a note, a web page or an app that doesn't mark it as hidden, Tuck records it like any other text.
- It doesn't remove an image that shows a secret. The text isn't kept, so the image can't be found by searching, but the picture stays in your history until you delete it.
- It doesn't encrypt the history itself. The file is protected by your macOS account and by FileVault if you use it. If you back up your Mac, the history is in the backup.
- Clear History keeps pinned clips. Don't pin anything secret.
- Pausing needs the menu bar icon. If you've hidden the icon in Settings > General, show it again to reach Pause Capture.
As Tuck's privacy policy puts it, the detection is a safeguard, not a guarantee. Add the apps you copy sensitive things from to the list, and pause when you know what's coming.
For what a history is good for, see What a clipboard manager is, and who needs one on a Mac. For images, see How to copy Mac screenshots to the clipboard.