cavi-au / Consent-O-Matic

Browser extension that automatically fills out cookie popups based on your preferences
Other
2.53k stars 123 forks source link

Permission requirements now include "Access browser tabs"; document required permissions #439

Closed hills closed 1 month ago

hills commented 3 months ago

Since this is privacy-oriented software it would be good to absolutely minimise the required permissions and, where it is not possible, to document to the user the reason for each permission.

A recent upgrade introduced the "Access browser tabs" permission in Firefox, but the reason was not immediately clear. I traced it to commit c8f5057 which justifies it as necessary for iframes (not tabs).

svnhub commented 3 months ago

The idea about documenting the permissions and why they are requested in the README is a good one!

For now I'll just write a few notes about the specific one right here as this may change a lot in the near future as we are transitioning to Manifest v3 due to (primarily) Chrome pushing that platform very soon.

The tab and tabs permission are requested in order to read the URL of the primary page when Consent-O-Matic is run for a popup in an iframe inside another page. In this case we read the URL of the parent tab (not the iframe) to see if the user has disabled CoM on this page.

There is a difference between how Firefox and other browsers handles calls into the background script from iframes. Both Chrome and Safari provide the caller tab URL when the tab permission is requested but Firefox also needs the tabs permission. Whether this is a bug in Firefox is a good question. Background scripts are deprecated and replaced by service workers in manifest v3.

svnhub commented 1 month ago

In the next release the requested permissions are now documented in the README.md (the frontpage of the git repository) and are also documented in the extension as part of the new onboarding step if the permissions haven't been granted by the user as part of the installation.

It describes the 3 primary permissions requested: