Hacker News new | ask | show | jobs
by dcrazy 12 hours ago
The reason there’s no API for this is because malicious apps will (not can; will and have) use programmatic pasteboard access to harvest passwords, credit card numbers, and anything else.
2 comments

Sure, but instead of granting full UI automation privileges to, say, a clipboard manager, wouldn't it be cool if it could request a privilege of "receiving a copy of everything you copy while the application is open" and of "the pasting of arbitrary content into the focused application"?

Or alternatively, if an app is requesting a11y permissions purely to simulate Cmd-V, it could register that as what it proposes to do, and any request to do anything other than pretend to Cmd-V wouldn't work.

Also, there should be but isn't an ability to say that a certain app is not allowed to have network access of any kind.

If an app were sandboxed, denied any network access, and granted those narrow permissions, it could be an extremely harmless clipboard manager. Instead clipboard managers have to be allowed far more extreme capabilities, or they cannot exist.

Pasteboard is already accessible for all apps without any extra permissions :). Unless you are referring to CMD+V operation which requires "Accessibility" permission.
Apple has been adding restrictions to programmatic pasteboard access, especially on iOS.
True, on iOS there's a prompt, but not on macOS.