| 1 |
Security |
| 2 |
======== |
| 3 |
|
| 4 |
This page describes how CopyQ handles the clipboard data and how to make the |
| 5 |
clipboard safer. |
| 6 |
|
| 7 |
Data Storage |
| 8 |
============ |
| 9 |
|
| 10 |
By default, Any text or image in the clipboard is stored automatically in CopyQ. |
| 11 |
|
| 12 |
You can completely disable automatic clipboard storing or avoid storing content |
| 13 |
copied from windows with matching window titles. |
| 14 |
|
| 15 |
.. seealso:: |
| 16 |
|
| 17 |
- :ref:`faq-disable-clipboard-storing` |
| 18 |
- :ref:`faq-ignore-password-manager` |
| 19 |
|
| 20 |
The data from all tabs are stored in the configuration directory unencrypted |
| 21 |
(unless the Encryption is enabled). |
| 22 |
|
| 23 |
.. seealso:: |
| 24 |
|
| 25 |
- :ref:`faq-config-path` |
| 26 |
- :ref:`encrypt` |
| 27 |
|
| 28 |
CopyQ does not collect any other data and does not send anything over network. |
| 29 |
|
| 30 |
.. _secret-clipboard: |
| 31 |
|
| 32 |
Secret Clipboard Data |
| 33 |
===================== |
| 34 |
|
| 35 |
Password managers, web browsers in private or incognito mode, remote desktop |
| 36 |
software (such as RDP or Citrix), and virtualization tools (such as VMware or |
| 37 |
VirtualBox) often mark clipboard content as secret. CopyQ recognizes this |
| 38 |
and **silently ignores the clipboard change** — by default, the data is not |
| 39 |
stored, not shown, and not processed by automatic commands. |
| 40 |
|
| 41 |
Detection is platform-specific. The clipboard formats that indicate secrets are: |
| 42 |
|
| 43 |
- **Linux** — ``x-kde-passwordManagerHint`` set to ``secret``. Used by |
| 44 |
KeePassXC, KDE Wallet, and other password managers. |
| 45 |
- **macOS** — Presence of ``application/x-nspasteboard-concealed-type``. Used by |
| 46 |
Keychain Access, 1Password, and other macOS applications. |
| 47 |
- **Windows** — Any of the following formats: |
| 48 |
|
| 49 |
- ``Clipboard Viewer Ignore`` |
| 50 |
- ``ExcludeClipboardContentFromMonitorProcessing`` |
| 51 |
- ``CanIncludeInClipboardHistory`` set to ``0`` |
| 52 |
- ``CanUploadToCloudClipboard`` set to ``0`` |
| 53 |
|
| 54 |
These are `documented by Microsoft |
| 55 |
<https://learn.microsoft.com/en-us/windows/win32/dataxchg/clipboard-formats#cloud-clipboard-and-clipboard-history-formats>`__ |
| 56 |
and used by Windows Credential Manager and most third-party password managers. |
| 57 |
|
| 58 |
In all cases, CopyQ adds the ``application/x-copyq-secret`` format (available in |
| 59 |
scripts as :js:data:`mimeSecret`) and hands the data to the |
| 60 |
``onSecretClipboardChanged()`` callback. The default implementation discards |
| 61 |
everything except the secret marker, so no sensitive content reaches CopyQ's |
| 62 |
history or automatic commands. |
| 63 |
|
| 64 |
To check whether the current clipboard content is considered secret, open |
| 65 |
**File — Show Clipboard Content** (default shortcut ``Ctrl+Shift+C``) in the |
| 66 |
main window. If any of the formats listed above appear in the clipboard data, |
| 67 |
CopyQ treats the content as secret. |
| 68 |
|
| 69 |
Overriding Secret Detection |
| 70 |
---------------------------- |
| 71 |
|
| 72 |
If CopyQ is ignoring clipboard data that you want to capture — for example, |
| 73 |
content from a private browser window or a remote desktop session — you can |
| 74 |
override the default behavior. |
| 75 |
|
| 76 |
The safer approach is to allow secret clipboard data only from specific windows. |
| 77 |
The following Script command processes secrets only when the source window title |
| 78 |
contains "Chromium", "Chrome", or "Firefox" (adjust the pattern to match your |
| 79 |
browser or application): |
| 80 |
|
| 81 |
.. code-block:: ini |
| 82 |
|
| 83 |
[Command] |
| 84 |
Command=" |
| 85 |
const onSecretClipboardChanged_ = onSecretClipboardChanged |
| 86 |
onSecretClipboardChanged = function() { |
| 87 |
const title = str(data(mimeWindowTitle)) |
| 88 |
if (title.match(/Chromium|Chrome|Firefox/i)) |
| 89 |
onClipboardChanged() |
| 90 |
else |
| 91 |
onSecretClipboardChanged_() |
| 92 |
} |
| 93 |
" |
| 94 |
IsScript=true |
| 95 |
Name=Store Secrets from Browser |
| 96 |
Icon=\xf21b |
| 97 |
|
| 98 |
This keeps passwords from password managers safely ignored while allowing |
| 99 |
clipboard data from private browsing windows. |
| 100 |
|
| 101 |
Alternatively, to process **all** secret clipboard data regardless of source: |
| 102 |
|
| 103 |
.. code-block:: ini |
| 104 |
|
| 105 |
[Command] |
| 106 |
Command="global.onSecretClipboardChanged = global.onClipboardChanged" |
| 107 |
IsScript=true |
| 108 |
Name=Store/Process All Secrets |
| 109 |
Icon=\xf09c |
| 110 |
|
| 111 |
.. warning:: |
| 112 |
|
| 113 |
Processing all secrets means **passwords from password managers will be |
| 114 |
stored in CopyQ's unencrypted history**. If you enable this, consider also |
| 115 |
enabling encryption (see :ref:`encrypt`) to protect stored items, or use |
| 116 |
selective automatic commands to filter what gets saved. |
| 117 |
|
| 118 |
.. seealso:: |
| 119 |
|
| 120 |
- :js:func:`onSecretClipboardChanged` — scripting API reference |
| 121 |
- :ref:`faq-ignore-password-manager` — ignoring password manager windows by title |
| 122 |
- :ref:`encrypt` — encrypting stored clipboard data |
| 123 |
|
| 124 |
|
| 125 |
Clipboard Content Visibility |
| 126 |
============================ |
| 127 |
|
| 128 |
The clipboard content is normally shown in the item list of a clipboard tab, |
| 129 |
main window title, tray tool tip and notification. |
| 130 |
|
| 131 |
To disable showing the current clipboard in GUI, use `"No Clipboard |
| 132 |
in Title and Tool Tip" command |
| 133 |
<https://github.com/hluk/copyq-commands/tree/master/Scripts#no-clipboard-in-title-and-tool-tip>`__ |
| 134 |
and disable notifications (in Preferences). |
| 135 |
|
| 136 |
.. seealso:: |
| 137 |
|
| 138 |
- :ref:`faq-disable-notifications` |
| 139 |
- :ref:`faq-share-commands` |
| 140 |
|
| 141 |
Clipboard Access |
| 142 |
================ |
| 143 |
|
| 144 |
Usually other applications can access clipboard content without any |
| 145 |
restriction. |
| 146 |
|
| 147 |
To restrict accessing the data after a long time, use `"Clear Clipboard After |
| 148 |
Interval" command |
| 149 |
<https://github.com/hluk/copyq-commands/tree/master/Scripts#clear-clipboard-after-interval>`__. |