You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 33968cf
Browse filesBrowse the repository at this point in the historyBrowse files
feat: grade shell commands by what they run, add self-update command (#4)
* feat: grade shell commands by what they run instead of flagging every call
Every Executor call was High, so every terminal plugin needed review even
when it only ran `uname -m` or `apk add git`.
- Split each command like a shell (`;`, `&&`, `||`, pipes, subshells,
`$(…)`) and grade each part: read-only commands are Low, visible
commands with side effects are Medium, and only commands the scanner
cannot see (runtime command name, `sh -c $x`, `eval`, `node -e`, text
piped into a shell) are High. Runtime values keep a command at Medium.
- Follow command helpers (`const sh = c => Executor.execute(c)`,
`this.run(cmd)`), so each call is graded with its own command; closed
helpers add no finding of their own.
- Resolve getters (`getExecutor()`), which hid all shell use, plus
shell-quoting helpers, `JSON.stringify`, template-building functions,
`$VAR` names assigned in the same script, proot/chroot wrappers, and
every branch of `a ? "x" : "y"`.
- `Executor.write` to a program the plugin started is input (Low), not a
command. Unknown text typed into a terminal tab is Medium; a runtime
command followed by Enter is High. Requiring the terminal module is
Medium.
- Stop dangerous-command look-alikes: `rm -rf ~/.cache/x` is not wiping
home, reading `/etc/profile` is not persistence, Acode's own data folder
is not another app's, `crontab -l` is not scheduling.
- `diff` treats a new Medium shell command as a reason to review and
ignores new read-only ones.
- Bump rules version to 2026.11.1.
* feat: add `update` command to replace the installed binary in place
Updating meant finding the right release asset by hand and copying it
over the old binary.
`plugin_scanner update` (alias `self-update`) reads the latest release
from the GitHub API, downloads the build for this platform with curl
(or wget), checks it against the published .sha256 and GitHub's own
digest, runs it once with --version, and only then renames it over the
running executable. A failed step leaves the current binary untouched.
- `--check` only reports whether a newer release exists.
- `--version <x>` installs a specific release, including a downgrade.
- `--force` reinstalls the current version.
- A permission error suggests sudo; platforms without a prebuilt build
point to `cargo install --git`.
|`diff <old> <new>`| What changed between two versions: new or escalated findings, new hosts, modules, permissions, changed files. `--format terminal\|json\|md`. |
34
+
|`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. |
31
35
|`--fail-on <level>`| Exit 1 when reached. For `scan`: `info`…`critical` (highest severity) or `review` / `block` (recommendation). For `diff`: `review` / `block`. |
32
36
|`--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. |
@@ -39,16 +43,17 @@ threshold reached, `2` unreadable archive or other error.
39
43
40
44
| Recommendation | Meaning | Typical cause |
41
45
| --- | --- | --- |
42
-
|`pass`| Nothing above Medium. Safe to publish without a human look. | Normal editor plugins: fs, fetch, commands, storage, settings. |
43
-
|`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. |
46
+
|`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`). |
47
+
|`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. |
44
48
|`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`. |
45
49
46
-
For **updates**, use `diff`. A terminal plugin always comes out as `review`
47
-
on a full scan, but if nothing new appears in the diff, the update is `pass`.
48
-
Updates that add a High/Critical capability, a new declared permission, or a
49
-
new flagged host are `review` (or `block`). So are updates that keep a
50
-
capability but use it with new arguments: a terminal plugin that starts
51
-
running a different shell command, a new native `Service.action`, or a new
50
+
For **updates**, use `diff`. If nothing new appears in the diff, the update is
51
+
`pass`, even for a plugin that needed a review on its full scan. Updates that
52
+
add a High/Critical capability, a new declared permission, or a new flagged
53
+
host are `review` (or `block`). So are updates that keep a capability but use
54
+
it with new arguments: a terminal plugin that starts running a different
55
+
shell command (any command with side effects, even a Medium one; new
56
+
read-only commands don't count), a new native `Service.action`, or a new
0 commit comments