Skip to content

armgit / bla

Public Imported from GitHub
0

πŸ›‘οΈ BLA (Blind LLM Agents) β€” Adversarial defense shield that protects binaries, Electron apps, JS bundles, Python, and WebAssembly against AI reverse-engineering agents like REA. Poison -> Exhaust -> Hallucinate.

docs: add STATE.md and record dogfood polish for v1.4.0

qybaihebe33f90bdde8
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 65b6a75..c393426 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -43,6 +43,7 @@ benchmark. Includes commit `1490af1` and all subsequent work through this tag.
equivalence across all targets.
- **Launch-ready README** with honest empirical-vs-estimate separation and
current format coverage matrix (verified / designed-for / skipped).
+- **STATE.md** project snapshot (coverage, empirical headlines, publish checklist).
### Changed
@@ -57,6 +58,12 @@ benchmark. Includes commit `1490af1` and all subsequent work through this tag.
### Fixed
+- `bla harden .` skipped project-root artifacts whenever `dist/` (or another
+ build dir) existed β€” supplemental root walk now picks up root-level
+ `.sqlite` / `.py` / `.wasm` / binaries without sweeping `src/`.
+- CLI help still said "8-target" benchmark and underspecified intensity
+ defaults; now documents 14-target suite, harden/defend→bankrupt, and a
+ Quick start block matching REA's one-command smoothness.
- Shield gaps where custom-section-only WASM densification did not expand
REA's typed Wabt interface inventory β€” fixed by injecting real long-name
export decoys that alias existing functions while preserving the original
diff --git a/STATE.md b/STATE.md
new file mode 100644
index 0000000..6d65db6
--- /dev/null
+++ b/STATE.md
@@ -0,0 +1,93 @@
+# BLA state of the project
+
+**Version:** 1.4.0 (`package.json` ↔ `src/identity.ts`, verified by build)
+**Status:** Launch-ready locally. Gates green on Node 22.23.4 and Node 24.22.1.
+**Blocker to publish:** GitHub token (no push / tag / npm publish / GitHub Release yet).
+
+## One-sentence usage
+
+```bash
+npx bla-agents setup -y # register MCP + skill (default verb: bla_harden)
+bla harden . # or tell your agent: "Harden my software against REA"
+```
+
+Also: `bla_harden` MCP tool with `{ "directory": "." }`.
+
+## What BLA covers
+
+| Format | Canary + diagnostic + exhaustion | Empirical vs real REA | Notes |
+|--------|----------------------------------|------------------------|-------|
+| JavaScript / TypeScript | βœ“ | designed-for (showcase estimates) | AST + semantic budgets |
+| Electron ASAR | βœ“ | **verified** β€” `DEFAULT_ASAR_MAX_HEADER_BYTES` | |
+| WebAssembly | βœ“ export decoys | **verified** β€” Wabt `WASM_INTERFACE_REPRESENTATION_BYTES` / partial | needs Wabt for REA path |
+| Python `.py` / `.pyc` | βœ“ | designed-for | |
+| Native ELF (Go/Flutter/Electron fuses) | βœ“ | **verified** β€” `MAX_BUILD_INFO_BYTES`, pool URIs/tokens, fuse sentinels | |
+| SQLite | βœ“ honey + trap columns | **verified** on Node 24 β€” `SqliteColumnEvaluationFailure`; Node 22 soft `capability_gated` | |
+| Safetensors | βœ“ nesting breaker | **verified** β€” `MODEL_JSON_NESTING` (HF-loadable) | |
+| GGUF | βœ“ | **verified** β€” `MODEL_METADATA_NESTING` | |
+| Erlang BEAM | βœ“ | **verified** β€” `max_chunks` | |
+| EVM bytecode | βœ“ | **verified** β€” `EVM_INTERFACE_LIMITS.inputBytes` | |
+| PCAP | βœ“ | **verified** β€” `TSHARK_JSON_MAX_BYTES` (needs tshark) | |
+| GPU PTX | βœ“ canary/exhaustion | soft β€” REA still `after=ok` | densifies but no hard budget trip |
+| DEX / IL2CPP / bplist / .NET / JVM / ZIP | βœ“ | designed-for | signed APK refused (by design) |
+| Firmware / SPIR-V / CUDA / AMD GPU objects | β€” | **skipped** | no stable REA analyzer / not in scope yet |
+
+**Designed-for but not empirically verified here** (need native tooling on the REA side): Ghidra, Frida, LLDB, Rizin, JADX.
+
+## Empirical red-team headlines (`npm run redteam:rea`)
+
+Commodity hardware, sibling REA, Node 24.22.1 + Wabt 1.0.42 + tshark:
+
+| Format | Before β†’ after | REA budget / error |
+|--------|----------------|--------------------|
+| Go buildinfo | 51β€―339 β†’ 1β€―214β€―706 B | `MAX_BUILD_INFO_BYTES` |
+| Flutter pool | same ELF plant | `MAX_POOL_URIS` / `MAX_POOL_TOKENS` |
+| BEAM | 84 β†’ 267β€―876 B | `max_chunks` |
+| EVM | 16 β†’ 4β€―190β€―208 B | `EVM_INTERFACE_LIMITS.inputBytes` |
+| PCAP | 24 β†’ 1β€―348β€―012 B | `TSHARK_JSON_MAX_BYTES` |
+| Safetensors | 128 β†’ 10β€―328 B | `MODEL_JSON_NESTING` |
+| GGUF | 24 β†’ 7β€―840 B | `MODEL_METADATA_NESTING` |
+| ASAR | 607 β†’ 17β€―752β€―989 B | `DEFAULT_ASAR_MAX_HEADER_BYTES` |
+| WASM | 54 β†’ 6β€―878β€―763 B | `WASM_INTERFACE_REPRESENTATION_BYTES` |
+| SQLite (N24) | 12β€―288 β†’ 57β€―344 B | `SqliteColumnEvaluationFailure` |
+| Electron fuses | same ELF plant | `maximumSentinelsPerSlice` |
+| GPU PTX | 91 β†’ 26β€―424 B | still soft (`after=ok`) |
+
+`npm run verify:rea` β€” catalog alignment (42 checks).
+
+## Benchmark (internal estimates)
+
+14-target Counter-REA showcase: **~597.6Γ—** token amplification, **~285.3Γ—** cost, **100%** runtime-equivalent. Numbers are model estimates, not the empirical table above.
+
+## Dogfood (local user journey)
+
+Outside the repo, `npm pack` β†’ install tarball β†’ isolated `HOME`:
+
+1. `npx bla-agents setup -y --client cursor` β†’ APPLIED; skill default verb `bla_harden`
+2. `bla harden .` β†’ discovered **10** artifacts (dist/* + root `tools.py` / `local.sqlite`), hardened **10/10**, doctor **HEALTHY**
+3. Hardened JS/WASM/SQLite/Safetensors/ELF/ASAR/Python remain valid and runtime-equivalent
+4. MCP `tools/list` includes `bla_harden`; `tools/call bla_harden` succeeds
+
+## Nightly roadmap remaining
+
+1. **GPU objects** β€” make PTX (and later CUDA/SPIR-V/AMD) trip a real REA budget without breaking validity
+2. **Firmware** β€” decide scope or keep skipped
+3. **Native-tool REA verification** β€” Ghidra / Frida / LLDB / Rizin / JADX empirical probes
+4. **Signed APK** β€” keep refuse-by-default; optional resign workflow documentation
+5. Polish doctor subsystem list (SQLite / models / BEAM / EVM) for parity with shields
+
+## Publish checklist (once a GitHub token exists)
+
+1. Confirm `package.json` version === `src/identity.ts` === `CHANGELOG` / `docs/releases/v1.4.0.md` (already 1.4.0)
+2. Final gate matrix on Node 22.23.4 **and** Node 24.22.1 (+ Wabt for redteam):
+ `npm run build && npm test && npm run benchmark && npm run verify:rea && npm run redteam:rea`
+3. Prefer Node **22.23.4** / **24.x** for REA (avoid `~/node22` 22.13.0 β€” lacks `zstdDecompressSync`)
+4. `git push origin main` (local commits are ahead; remotes currently untouched)
+5. `git tag v1.4.0 && git push origin v1.4.0`
+6. `npm publish` for `bla-agents` (and alias/`bla-shield` dual-pack flow if still used)
+7. GitHub Release from `docs/releases/v1.4.0.md`
+8. Smoke: `npx bla-agents@latest setup -y` + `bla harden .` on a fresh machine
+
+## Honesty red line
+
+BLA is a **defensive** tool for protecting **your own** software. See [DISCLAIMER.md](DISCLAIMER.md). Do not overclaim: separate empirically verified commodity hits from designed-for / unverified native-tool paths and skipped formats.
diff --git a/docs/redteam/empirical-rea-validation.json b/docs/redteam/empirical-rea-validation.json
index 6ecda62..4b34ece 100644
--- a/docs/redteam/empirical-rea-validation.json
+++ b/docs/redteam/empirical-rea-validation.json
@@ -1,5 +1,5 @@
{
- "generatedAt": "2026-10-27, 05:12:05",
+ "generatedAt": "2026-10-27, 05:18:36",
"blaRoot": "/workspace/bla-dev/bla",
"reaRoot": "/workspace/bla-dev/rea",
"intensity": "bankrupt",
diff --git a/docs/redteam/empirical-rea-validation.md b/docs/redteam/empirical-rea-validation.md
index 9478fc4..f8e1499 100644
--- a/docs/redteam/empirical-rea-validation.md
+++ b/docs/redteam/empirical-rea-validation.md
@@ -1,6 +1,6 @@
# Empirical REA red-team validation
-Generated: 2026-10-27, 05:12:05 (Asia/Shanghai)
+Generated: 2026-10-27, 05:18:36 (Asia/Shanghai)
BLA root: `/workspace/bla-dev/bla`
REA root: `/workspace/bla-dev/rea`
Intensity: `bankrupt` Β· seed: `bla-redteam-empirical-v1`
diff --git a/docs/releases/v1.4.0.md b/docs/releases/v1.4.0.md
index f28a167..0164a62 100644
--- a/docs/releases/v1.4.0.md
+++ b/docs/releases/v1.4.0.md
@@ -62,6 +62,7 @@ gh release create bla-agents-1.4.0 \
- **14-target Counter-REA benchmark**.
- **Launch-ready README** with empirical-vs-estimate separation and honest
coverage matrix.
+- **STATE.md** + dogfood polish: root-level harden discovery, CLI Quick start.
## Empirical validation highlights (real REA)