Skip to content

Conversation

@legoktm
Copy link
Member

@legoktm legoktm commented Nov 21, 2025

In case the user pasted a password from a vault VM, clear it off the local VM's clipboard.

Fixes #2844.

Test plan

  • Copy something on your clipboard
  • Run the app and login (whether manually or using auto login)
  • Try pasting, it should be empty.

Checklist

This change accounts for:

  • testing changes on Qubes as needed (especially changes related to cryptography, export, disposable VM use, or complex UI changes)
  • any needed updates to the AppArmor profile for files beyond the application code
  • any needed self-contained database migrations (including testing against a clean test database from main)

In case the user pasted a password from a vault VM, clear it off the
local VM's clipboard.

Fixes #2844.
@legoktm legoktm requested a review from a team as a code owner November 21, 2025 21:11
@legoktm legoktm moved this to Ready For Review in SecureDrop Nov 21, 2025
@deeplow
Copy link
Contributor

deeplow commented Nov 24, 2025

FYI, Qubes also has this feature. According to the docs:

Automatic clipboard wiping

By default data pasted into a qube will remain there until user copies something else or restarts the qube. It’s possible to make the qubes-gui process inside a qube wipe the clipboard automatically after a minute from the last paste operation. This helps protect users from accidentally pasting the old content of the clipboard like a password in the wrong place like a browser search bar. Since qubes don’t share the same clipboard, software like KeePassXC isn’t able to automatically wipe the clipboard of other qubes.

To enable automatic wiping of the clipboard after a minute use qvm-service:

qvm-service --enable VMNAME gui-agent-clipboard-wipe

I haven't played around with this one, but it seems to solve this exact problem and it would work for both the client and the app. Not sure if at this stage it's worth replacing this PR with this, but I just didn't want to go without mentioning.

Copy link
Contributor

@vickiniu vickiniu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change seems good to me, but also it looks like electron's clipboard clear might not clear the system keyboard? per this issue: electron/electron#9386

not sure what the behavior will be on Qubes, but if we land this might want to do a follow-up at the workstation level regardless

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

Labels

None yet

Projects

Status: Ready For Review

Development

Successfully merging this pull request may close these issues.

app: Clear clipboard after login

4 participants