Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leizhenpeng/check-chrome-perms
Chrome Extension Permission Checker
https://github.com/leizhenpeng/check-chrome-perms
extension extension-chrome
Last synced: 13 days ago
JSON representation
Chrome Extension Permission Checker
- Host: GitHub
- URL: https://github.com/leizhenpeng/check-chrome-perms
- Owner: Leizhenpeng
- Created: 2024-05-26T16:18:21.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-08-30T12:45:12.000Z (5 months ago)
- Last Synced: 2025-01-04T20:23:46.192Z (19 days ago)
- Topics: extension, extension-chrome
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/check-chrome-perms
- Size: 10.7 KB
- Stars: 27
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Check Chrome Perms
A tool to detect violations by requesting but not using the following Chrome extension permission(s).
## Installation
```bash
npm install -g check-chrome-perms
```## Usage
```bash
check-perms
```### Example
1. Navigate to your project directory:
```bash
cd /path/to/your/chrome-extension
```2. Build your Chrome extension (assuming your build output is in the `build` directory):
```bash
npm run build
```3. Run the permission checker on your build output:
```bash
check-perms ./build/chrome-mv3-prod
```### Sample Output
#### Case 1: All permissions are correctly used
```plaintext
Permissions requested by the extension:
[ 'storage', 'tabs', 'bookmarks' ]
All permissions are used and declared correctly.
```#### Case 2: Some permissions are requested but not used
```plaintext
Permissions requested by the extension:
[ 'storage', 'tabs', 'bookmarks' ]
Permissions are not used but declared:
- tabs
```#### Case 3: Some permissions are used but not declared
```plaintext
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.