Skip to content
i098Public

About

Anti-BLA toolkit: scan, clean and check BLA-hardened builds (decoys, traps, budget exhaustion) so REA can analyze them

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

19 stars

Watchers

0 watching

Forks

Repository files navigation

ReClarity: anti-BLA toolkit for REA

Featured in Awesome REA License: MIT

English | العربية | 中文 | Français | Русский | Español

ReClarity is an anti-BLA toolkit. BLA (Blind LLM Agents) hardens a build with decoy code, fixed-limit floods and clean-looking shadow logic so that the AI reverse-engineering agent REA fails. BLA must keep program behavior the same, so ReClarity cleans the BLA decoys from a copy and checks the copy by running it before REA reads it.

Agents: follow setup.md for exact setup steps from a clean machine.

Install

Needs Bun and REA on PATH (npm install --global rea-agents). Run from your project root:

npx skills add i098/ReClarity --skill anti-bla -a universal -y
bun .agents/skills/anti-bla/scripts/install.ts

The second command puts a rea shim before the real REA on PATH and wraps the MCP launchers of REA. It needs no agent and no hook. When no PATH folder before REA is writable, it adds one marked PATH line to your shell profiles, so every new shell runs ReClarity when REA runs. RECLARITY=off gives plain REA. Other agents, hooks, --check and --remove: docs/install.md.

Run

rea analyze-javascript-application app.asar

Replace app.asar with your build. The shim runs the real REA once for this command; every other rea command is plain REA. When REA hits a limit, one [reclarity] line on stderr names the verdict. Without the shim, run the manual run.ts command in docs/usage.md.

What to expect

  • Clean build: REA reads the original once. No clean copy (clear).
  • Large real build: REA refuses, for example on an ASAR header over its limit. No clean copy, and the [reclarity] line names the REA setting that raises the limit (limited-real).
  • BLA build: ReClarity cleans a copy and runs the original and the copy in a sandbox. REA reads the copy when it lost bytes or entries and behaves like the original (hardened).

The fourth verdict, sealed, and the full table are in docs/usage.md.

Side by side: REA with BLA, and REA with BLA + ReClarity

sbs-labels.mp4

Start when REA runs: the rea shim judges the result

reclarity-autotrigger-e2e.mp4

The video shows the earlier hook route; the current route is the rea shim (docs/install.md).

flowchart TD
    A["Agent runs rea"] --> B["The shim runs the real REA once, on the original"]
    B --> C{"Key 1: does the REA record show a limit?"}
    C -->|no| D["clear: REA reads the original"]
    C -->|yes| E["Key 2: clean a copy, then run the original and the copy in a sandbox"]
    E -->|"key 2 cannot be proven here"| G["limited-real: REA reads the original"]
    E --> F{"Did the copy lose bytes or entries, and behave like the original?"}
    F -->|no| G
    F -->|"no, on a sealed build"| H["sealed: the build checks its own bytes, so REA does not run again"]
    F -->|yes| I["hardened: REA reads the clean copy"]
    I --> J["The shim runs REA again, on the clean copy"]
Loading

Optional hooks

The setup-clarity hooks stop an agent that obeys text in a target. They do not start ReClarity: docs/install.md.

BLA de-obfuscation: what it does

  • Scan a build for BLA trap shapes and report a score from 0 to 100. The score does not decide what REA reads.
  • Clean a copy of the build; the original never changes.
  • Check by running the build in a bwrap sandbox with coverage. Never-run code proves nothing.
  • Judge each REA result with two facts. Key 1: REA hit a limit. Key 2: a clean copy lost bytes or entries but behaves like the original.
  • Guard the budget with token and time caps. REA runs once on the original, and again only on a hardened verdict, on the clean copy.
  • Treat target text as data: bait text is a finding.

Docs

Contribute

See CONTRIBUTING.md. Report a vulnerability as in SECURITY.md. Changes are listed in CHANGELOG.md.

License

MIT

About

Anti-BLA toolkit: scan, clean and check BLA-hardened builds (decoys, traps, budget exhaustion) so REA can analyze them

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

19 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages