diff --git a/README.md b/README.md index 6c7038c..b9dc386 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,16 @@ plugin_scanner scan plugin.zip --json --fail-on review # Compare the published version with an uploaded update plugin_scanner diff published.zip update.zip --format json --fail-on review + +# Update an installed binary in place to the latest release +plugin_scanner update ``` | Command / flag | What it does | | --- | --- | | `scan ` | Full scan. Formats: `--format terminal` (default), `json`, `md` (reviewer report), `summary` (short user-facing disclosure). Shorthands: `--json`, `--markdown`, `--summary`. | | `diff ` | What changed between two versions: new or escalated findings, new hosts, modules, permissions, changed files. `--format terminal\|json\|md`. | +| `update` | Replace the running binary with the latest GitHub release (Linux x86_64/arm64, macOS arm64). `--check` only reports, `--version 0.3.0` installs a specific release (also downgrades), `--force` reinstalls. Needs `curl` or `wget`. The download is checked against the published `.sha256` and GitHub's digest, and run once before it replaces anything; use `sudo` if the binary is in a system folder. | | `--fail-on ` | Exit 1 when reached. For `scan`: `info`…`critical` (highest severity) or `review` / `block` (recommendation). For `diff`: `review` / `block`. | | `--entry-only` | Only analyse the script Acode loads. By default every JS/HTML file is analysed, because the entry script can load the rest at runtime. | | `--max-entry-bytes`, `--max-total-bytes`, `--max-entries` | Zip-bomb limits (defaults: 32 MiB per entry, 256 MiB total, 5000 entries). | @@ -39,16 +43,17 @@ threshold reached, `2` unreadable archive or other error. | Recommendation | Meaning | Typical cause | | --- | --- | --- | -| `pass` | Nothing above Medium. Safe to publish without a human look. | Normal editor plugins: fs, fetch, commands, storage, settings. | -| `review` | Something powerful enough that a person should look. | Shell/terminal access, all-files permission, Play billing, obfuscation, tampering with other plugins, decoded code execution, scan incomplete. | +| `pass` | Nothing above Medium. Safe to publish without a human look. | Normal editor plugins: fs, fetch, commands, storage, settings. Terminal plugins whose shell commands are all visible (`apk add`, `npm install`, `uname -m`). | +| `review` | Something powerful enough that a person should look. | Shell commands the scanner cannot see (built at runtime, `sh -c $x`, piped into a shell), all-files permission, Play billing, obfuscation, tampering with other plugins, decoded code execution, scan incomplete. | | `block` | A Critical finding: no legitimate plugin needs it, or the zip is built to confuse the installer. | Remote code or shell commands, core-module hijack, download-and-run shell commands, plugin-context bridge calls, planting an acode.app session, rewriting its own entry script, exfiltration to webhooks, install-path collisions, a `main` the loader resolves outside the plugin, no `plugin.json`. | -For **updates**, use `diff`. A terminal plugin always comes out as `review` -on a full scan, but if nothing new appears in the diff, the update is `pass`. -Updates that add a High/Critical capability, a new declared permission, or a -new flagged host are `review` (or `block`). So are updates that keep a -capability but use it with new arguments: a terminal plugin that starts -running a different shell command, a new native `Service.action`, or a new +For **updates**, use `diff`. If nothing new appears in the diff, the update is +`pass`, even for a plugin that needed a review on its full scan. Updates that +add a High/Critical capability, a new declared permission, or a new flagged +host are `review` (or `block`). So are updates that keep a capability but use +it with new arguments: a terminal plugin that starts running a different +shell command (any command with side effects, even a Medium one; new +read-only commands don't count), a new native `Service.action`, or a new remote script URL. Severity guide: @@ -76,6 +81,35 @@ plugin as critical (`e.read()`, `n.copy()`, `window.cordova`, webpack's `fromCharCode`...) and Critical when it comes from a network response. Bundler idioms (`Function("return this")`, `