107 points · by dethmasque · 3w ago · 64 comments
I'm so glad GrapheneOS supports this. P.S. If you're on GrapheneOS, this isn't enabled by default, but it is a global toggle - Please enable it.
Additionally, the clipboard is often used to copy items within the same application, a mechanism which again can be involved in a multitude of application commands; or else the user must be burdened with having to distinguish between an application-level and the system-level clipboard. This can be partially solved by always allowing pasting of content copied from the same OS process, but multi-process applications would still face hurdles.
Another variation of that is scripting. I have various scripts and CLI aliases that take the current clipboard contents and do something with it.
While the clipboard can be made more secure than it traditionally is, these security measures come with the usual trade-off of making things more annoying for the user.
streetfighter64 said “ event initiated by the user.”
Copy/paste can be initiated multiple ways, including through many entries. That does not matter. What matters is , the application has zero knowledge on what is on the clipboard. It can’t read/modify/delete. It can only allow the user to trigger an action, and the result of that action is transparent to the user.
Applications shouldn’t have access to contents inside the clipboard, otherwise you get in situations like this - https://cybersecuritynews.com/fake-captcha/
It's easier in iOS and Android where the input can always be controlled through the keyboard and there is mainly 1 or 2 apps in the foreground only so only those apps can request the clipboard like iOS does it.
Consider how the file picker works. If you press a button in the app, then a file picker is opened, but the app gets no access to anything until you select a file to give it. Clearly, this is way better than giving the app read access to your whole HDD.
Though, that's the way everything used to work previously, and a lot of apps still do that, but, only after the user has granted them full file system reading. So if an app is very specialized, perhaps it could be granted "full clipboard access", though I at least can't think of any app I'd give that.
For some values of better – e.g. I'm browsing through a folder with some (the) file explorer, and then decided to open an image with my favourite image viewer. The UX-friendly expectation is that I can then continue browsing (go to the next or previous image) from right inside the image viewer.
File system sandboxing however insists that the image viewer isn't allowed to access anything else, so instead I either have to go back all the way to the file explorer to open the next image, or at the very least invoke some kind of OS-blessed file open dialogue for the image viewer to be allowed to continue.
The latter is the official situation on Android, and it's rather suboptimal, to put it that way. (Made worse by the fact that the blessed way of opening a file with another app also tries to hide that file's location from the receiving app, so even if my image viewer e.g. already had sufficient file system permissions to access that file and its whole folder, without some hacky workarounds it still couldn't offer me to continue viewing other pictures inside the same folder because it doesn't really know which file it's currently opening.)
On desktop the file picker is just a helper library. It doesn’t provide any isolation. That was my question, desktop OSs (windows, Linux) don’t have that security model. Web apps have a different sandboxing where the file picker works that way, but that’s not just a given.
For example if you expect to copy something from an app, the app might ignore the operation, making you then paste somewhere the previous content which might be something sensitive.
(copying/pasting from password managers, etc should be once-only operation, but it's not always like that).
The bpost app (Belgian national post) immediately reads the clipboard when it gets opened and I hate this behaviour with a passion. While on the other hand it throws a fit if it ever detects an unlocked bootloader, root access, "suspicious" apps or whatever.
I ended up confining it to an outdated phone with a stock OS along with the bank and identity apps that I cannot avoid. I digress, but the original cause of my irritation was indeed lack of control on my clipboard that ia had noticed thanks to that small notification.
Even if I say something like "maybe the on-screen keyboard is exempt?" and say, open Firefox, and use the in-Firefox option of "Fill link from clipboard" instead of long-press & paste … no toasts?
(And yes, I'm after Android 12, this phone is new.)
Is this specific to particular Android versions or vendors? Curious if anyone can elaborate what we're supposed to see here.
edit: I will note that copying a password from a password manager showed it masked with asterisks in the keyboard's paste button.
Then around Android 10 they tightened security and decided background apps can no longer receive clipboard event. Which makes sense from a security standpoint, but it totally broke my dictionary app. I just wish they're a way as a developer to get around it with my own app.
Source: I wrote that AnkiDroid code ~6 years ago.
https://developer.android.com/reference/android/content/Inte...
PS: the menu can be disabled in the "General" settings of AnkiDroid... I need to get around to better onboarding for it.
Instead of trying to turn the clipboard into some citadel, it would be way more beneficial to security and UX to have more reliable password manager fill-ins.
The work-around the devs found is pretty good - there is a "send clipboard" action you can add directly to the notifications panel - but it's not as nice as it just working.
If we never had the clipboard (on any computer, not just Android) and it was suddenly invented today, it would never pass any major company's privacy or security review. Here we have something that allows the user to share any data instantly with any process that happens to be listening, including sensitive things like credentials, personal information, the works. It's a security nightmare! In today's paranoid times, no OS would say yes to a new feature like this, but we keep it because it's legacy and it can't be gotten rid of at this point.
You get an "Allow paste from <app>?" pop-up. Possibly only the first time you past from one app to another? Or maybe it resets after a while. I don't know the details.
But like that genuinely applies to a quite large amount of things. Screenshots, screen recordings, actual regular physical cameras, unencrypted physical cables, publically-usable GPS, microphones, etc. (these are even reasonably-realistic - Wayland & phones have restrictions for screen(shots| recording), backslash on cameraful glasses, DRM, criticism of airtags, leaking typed text through the typing sounds)
Could even go broader and count in people being non-anonymous online, and people being anonymous online, as both being bad for security; were the world to have settled on one, the other would be utterly crazy.
Giving semi-arbitrary anything to LLMs should absolutely very-trivially count in this too, except that for whatever reason it's very often just not? Clipboards would get a pass just fine.
On kde plasma right now with all that, wl-paste still sees the clipboard at any time from an unfocused window by creating a temporary invisible xdg_toplevel window that steals focus and grabs the clipboard.
I think we need something similar to xdg-dbus-proxy to control what messages can pass over the socket.
The current status quo for software architecture is giving a swarm of LLM agents root and full access to user data and letting them run amok, unsupervised, connected to a proprietary remote black box service either being monitored by Palantir or the CCP. What is this "paranoia" you speak of?
Everything else is cargo cult security.