Skip to content

feat: harden scanner against installer/loader gaps and add WebAssembly analysis - #2

Merged
bajrangCoder merged 2 commits into
mainfrom
feat/hardening-and-wasm
Oct 23, 2026
Merged

bajrangCoder merged 2 commits into
mainfrom
feat/hardening-and-wasm

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member

Fixes:

  • Code hidden under __MACOSX/, .DS_Store or Thumbs.db paths was never scanned, although Acode installs those entries.
  • A main with .. or backslashes made Acode's loader run a different file than the one the scanner treated as the entry.
  • Shell commands downloaded or decoded at runtime were graded the same as constant ones.
  • eval, Executor and other sinks reached through .call, .apply, .bind, Reflect.apply or Reflect.construct went undetected.
  • Plugins rewriting their own scripts or plugin.json at runtime (a post-review second stage) were not flagged.
  • Requests to acode.app/api, which Acode sends with the user's session cookies, and calls to the Authenticator bridge were not flagged.
  • WebAssembly was not analysed: shipped and base64-inlined modules, eval-style imports, URLs hidden in data segments, disguised modules, and modules compiled from remote URLs.
  • Hooks on native-plugin globals, security-relevant DOM/built-in methods, ad objects and the pluginsDisabled setting went undetected.
  • Downloaded or decoded HTML reaching innerHTML, insertAdjacentHTML, createContextualFragment, srcdoc, on* attributes or setAttribute("src") was not flagged.
  • Shell scripts shipped in the zip skipped the command checks; download-then-chmod, credential access, file uploads, piping to the network, untrusted package sources and cron persistence were not caught.
  • Remote pages and scripts loaded through the webview module were not flagged.
  • Forms and password fields in the readme/changelog, which the plugin page renders, could be used for phishing.
  • diff passed updates that used an existing capability with new arguments (e.g. a different shell command).

- Scan `__MACOSX/`, `.DS_Store` and `Thumbs.db` entries: Acode installs
  them, so code hidden there was never analysed. Real metadata is
  recognised by its header and stays quiet.
- Resolve `main` the way loadPlugin.js does: a `main` that climbs out of
  the plugin folder is Critical, one with backslashes falls back to
  main.js.
- Grade Executor / terminal commands by source like eval: downloaded is
  Critical, decoded is High.
- Follow `.call`, `.apply`, `.bind`, `Reflect.apply` and
  `Reflect.construct` to the real target.
- Flag plugins that write scripts or plugin.json where code is loaded
  from (own folder, baseUrl, cache/data storage); Critical when the
  content is downloaded or the entry/manifest is rewritten.
- Flag requests to acode.app/api, which Acode sends with the user's
  cookies (non-GET High, account reads Medium and part of the
  exfiltration check), and calls to the Authenticator bridge
  (`saveToken` Critical).
- Parse WebAssembly modules, shipped (by header) or inlined as base64:
  flag imports that run JS strings, feed data-segment URLs into the
  endpoint checks, flag disguised/invalid modules and modules compiled
  from remote URLs.
…pdate arguments

- Flag hooks on native-plugin globals (`system`, `Executor`, `sdcard`…),
  security-relevant DOM/built-in methods (`addEventListener`,
  `appendChild`, input `value`, `Function.prototype.call`…), Acode's ad
  objects, and `pluginsDisabled` edits. `Object.defineProperty(obj,
  "name")` now checks `obj.name`.
- Grade HTML sinks: `innerHTML`/`outerHTML`/`insertAdjacentHTML` with
  downloaded or decoded HTML, `createContextualFragment`/`srcdoc` (which
  run scripts), `on*` attributes, and `setAttribute("src")` on scripts.
- Run shipped `.sh` and `#!` scripts through the command rules, and add
  patterns for download-then-chmod, SSH keys and stored credentials, curl
  uploads, piping env/files to the network, untrusted package sources,
  and cron/boot persistence.
- Classify the `webview` module (remote pages, evaluate/loadHTML).
- Flag forms and password fields in the readme/changelog, which the
  plugin page renders through DOMPurify (forms are kept by default).
- `diff` reports new arguments for capabilities the old version already
  had (shell commands, native actions, remote script URLs), so an update
  that runs a different command needs review.
@bajrangCoder
bajrangCoder merged commit 37c538c into main Oct 23, 2026
5 checks passed
@bajrangCoder
bajrangCoder deleted the feat/hardening-and-wasm branch October 23, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant