check-chrome-perms
v1.0.7
Published
A tool to detect violations by requesting but not using the following Chrome extension permission(s):
Downloads
4
Readme
Check Chrome Perms
A tool to detect violations by requesting but not using the following Chrome extension permission(s).
Installation
npm install -g check-chrome-perms
Usage
check-perms <your-build-directory>
Example
Navigate to your project directory:
cd /path/to/your/chrome-extension
Build your Chrome extension (assuming your build output is in the
build
directory):npm run build
Run the permission checker on your build output:
check-perms ./build/chrome-mv3-prod
Sample Output
Case 1: All permissions are correctly used
Permissions requested by the extension:
[ 'storage', 'tabs', 'bookmarks' ]
All permissions are used and declared correctly.
Case 2: Some permissions are requested but not used
Permissions requested by the extension:
[ 'storage', 'tabs', 'bookmarks' ]
Permissions are not used but declared:
- tabs
Case 3: Some permissions are used but not declared
Permissions requested by the extension::
[ 'storage' ]
Permissions are used in the code but not declared:
- tabs
- bookmarks
By following the steps above, you can easily check for any unused or undeclared permissions in your Chrome extension and ensure compliance with best practices.