Browser Extension Declared-Against-Used Permission Minimality
Pricing
$30.00 / 1,000 package analyzeds
Browser Extension Declared-Against-Used Permission Minimality
Find permissions that an extension manifest declares but the code does not use.
Pricing
$30.00 / 1,000 package analyzeds
Rating
0.0
(0)
Developer
kingii98
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a month ago
Last modified
Categories
Security
Limited permissionsShare
Browser Extension Permission Minimality Gate
This Actor finds permissions that an extension manifest declares but the code does not use. Run it before you upload a release to the Chrome Web Store.
Input
| Field | Type | Default | Description |
|---|---|---|---|
packages | array of strings | one Chrome Web Store ID | Up to 20 public ZIP or CRX URLs, or Chrome Web Store extension IDs. Each package must be 50 MB or less. |
An empty input {} uses the default value. The run succeeds.
Output
The default dataset has two row types.
Permission row (type: "permission"), one for each declared permission:
package, extension_name, extension_version, permission, declared_in,
verdict (used, unused, or unknown), api_references, file_paths, note.
Summary row (type: "summary"), one for each package:
result (pass or fail), analysis_status, declared_count, used_count,
unused_count, unknown_count, unused_permissions, files_scanned, error.
Rules
resultisfailwhen at least one permission isunused. Otherwise it ispass.unknownnever causes afail.- A package that cannot be analyzed gets
result: "fail"and ananalysis_statusofunreachable,invalid_package, orinvalid_input. Theerrorfield gives the reason. These are results. The run still ends SUCCEEDED.
Pricing event
| Event name | Unit | Price (USD) |
|---|---|---|
package-analyzed | One extension package that was downloaded and scanned | 0.03 |
The Actor makes one Actor.charge call with count 1 for each analyzed package.
It does not charge for packages that are unreachable, invalid, or rejected by input checks.
If the maximum total charge limit is reached, the Actor stops and keeps the results that it
already stored. The default limit of USD 0.60 covers the maximum of 20 packages.
The price is set in the Apify Console. This repository does not change pricing.
How the scan works
- The Actor downloads the package with HTTP only. It uses no browser, proxy, or paid API.
- It reads the ZIP or CRX in memory. It does not run any code from the package.
- It reads
manifest.jsonand the permissions inpermissions,optional_permissions,host_permissions, andoptional_host_permissions. - It scans
.js,.mjs,.cjs, and.htmlfiles forchrome.*andbrowser.*API calls.
Limits and safety
- Download limits: 50 MB for each package, 3 redirects, 90 seconds, 4 downloads at a time.
- Archive limits: 5000 files, 250 MB unpacked, 5 MB for each script, 100 MB scanned in total.
- The Actor rejects URLs that use a scheme other than http or https, a port other than 80 or 443, credentials in the URL, or a host that resolves to a private or reserved address. It checks each redirect. The Actor resolves the host name one time for each request. It connects to the address that it approved. It keeps the host name for the Host header and for TLS (Transport Layer Security).
- A static scan can give a wrong answer. The Actor gives
unknown, notunused, when: code reads APIs in a dynamic way (for examplechrome[name],eval, orconst api = chrome;), when some files were too large or unreadable, when the permission has no detectable API (for exampleunlimitedStorage), fortabswhenchrome.tabscalls exist, and foractiveTabwhenchrome.tabscalls,chrome.tabCapture, or a user-action entry point exist. The entry points areaction.onClicked,browserAction.onClicked,pageAction.onClicked,contextMenus.onClicked,menus.onClicked, andcommands.onCommand. - Comments and strings that look like API calls count as use. A permission can show
usedwhen only a comment names the API. - A host permission is
usedwhen a content script matches it or the host name appears in the code. It isunknownwhen the code makes network or injection calls. Otherwise it isunused. - Packages can be remote and untrusted. The Actor never writes archive files to disk.
Local development
uv syncuv run pytestuv run ruff check .apify run --input-file .actor/default_input.json