Hi Alan, Dan Finlay here, one of the leads at MetaMask, a browser extension that provides key management, and exposes signing operations to compatible websites (and extensions, as you've noticed).
You're totally right I think on both counts:
- Any Chrome extension can interact with any other. At MetaMask we've even published
a module for making it easier to interact with our API for other extensions, and we require user consent before allowing any operations by this means.
- It is also true that WebExtension contentscripts (any extension that has been given user permission to "read and modify the contents of" that given website) is able to post messages to that website. Some extensions like ours request and are given a wildcard permission, and are able to post messages to any site. Not all sites play nice with this, we have definitely broken some sites in the past that seemed to expect that their messages posted came only from domains they controlled.
This is probably worth making a more well-known developer best practice. One saving grace from a security perspective is that the only extensions that can do this were basically granted the highest authority by their user, so in theory those might be more trustworthy extensions, but we'd have to see in practice.
- Dan