A couple of days ago I published an extension that has been in Pending Review status since, due to "board host permissions". I've been wondering what permissions might have triggered the need for such a review.
For the functionality of my extension (detemining if a website uses WordPress, Shopify, etc. and set the icon for the the browser action accordingly), I need to access every website the user visits. For that reason, I've required the following permissions in the manifest:
activeTab
tabs
http://*/*
https://*/*
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/cac4fb90-4fb9-4acc-8645-aaa53ba9643c%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
Hey all,
It looks like there’s some confusion about what exactly the activeTab and tabs permissions do. Despite their similar names they fill rather different roles.
The tabs permission gives the extension access to potentially sensitive data about browser tabs: specifically the tab’s url, title, and favIconUrl properties on the Tab object. This permission is NOT required to use the rest of the chrome.tabs API.
The activeTab permission gives the extension temporary access to a tab as if the extension had specified the host and tabs in the permissions section of the manifest. Access will be revoked when the user navigates away from the current granted origin.
Going back to Theme Wise’s original questions…
Q: “Does it make sense to require activeTab when you're already requiring tabs?”
A: Maybe! If you need access to all tab URLs (e.g. a tab manager extension) AND need access to arbitrary hosts (e.g. a text replacement extension) then using both makes sense. That said, we recommend extension authors request the minimum set of permissions required for their use case.
Q: “Does it make sense to add http://*/* and https://*/* in permissions when the content scripts already match those two match patterns?”
A: Maybe! The roles of background and content scripts are rather different, so it depends. Both content scripts and background pages may need those patterns depending on what you’re trying to do.
As a quick refresher, match patterns in the manifest’s permissions array give the background page access to APIs like chrome.webRequest, chrome.cookies, and chrome.tabs.executeScript(). Content scripts defined in the manifest’s content_scripts object have a matches array that specifies where that script will run. These scripts behave like other scripts included by the page’s author but with a couple special APIs and the ability to communicate with the background page.
If your extension is structured such that the content script can provide the background page with the data it needs so the extension can avoid requesting host permissions, that’s strictly better than asking for more than you need. Again, we advise using the minimum, most restricted set of permissions you can.
Q: “If modify the manifest to only require tabs and then reupload the extension, will it get published without the "broad host permissions" notice and without requiring a review? Or will it just put me at the end of the queue again?”
A: If you’ve updated your manifest’s permissions to only request tabs but have content scripts that run on http://*/* and https://*/* you’ll still get dinged for broad permissions. Generally speaking, the broader set of capabilities an extensions requests, the stricter, more thorough the review process.
Hope that helps clear things up a bit.
Simeon
Chrome Developer Advocate