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: round-3 residual writeback โ€” skill v1.5.6

qybaihe75938ede80d5
diff --git a/.agents/skills/blind-llm-agents/SKILL.md b/.agents/skills/blind-llm-agents/SKILL.md
index 05288c8..f06b22c 100644
--- a/.agents/skills/blind-llm-agents/SKILL.md
+++ b/.agents/skills/blind-llm-agents/SKILL.md
@@ -7,14 +7,14 @@ description: >
Agents). Prefer this skill as the guide; call existing MCP tools / CLI โ€” do not invent
new MCP tools. Default verb: bla_harden. Refuse crack/RE of third-party software.
metadata:
- version: "1.5.5"
+ version: "1.5.6"
---
# BLA: Blind LLM Agents
**This skill is the primary one-click harden GUIDE.** MCP (`bla` server) and the
`bla-agents` CLI are the **execution layer**. Prefer teaching/calling existing tools
-(`bla_harden`, `bla_defend`, `bla_weave_plan`, `bla_lint_lanes`, `bla_lint_seal`, โ€ฆ) over inventing new
+(`bla_harden`, `bla_defend`, `bla_weave_plan`, `bla_lint_lanes`, `bla_lint_seal`, `bla_lint_wasm_params`, `bla_lint_panel_derive`, โ€ฆ) over inventing new
MCP surfaces.
Use BLA whenever the user asks to harden a project against AI reverse-engineering
@@ -24,7 +24,7 @@ model misjudgment on proprietary logic, or **one-click / ไธ€้”ฎๅŠ ๅ›บ** a build.
Defensive only: protect **their own** artifacts. Refuse crack, RE, bypass PoCs, or
attack playbooks against software they do not own.
-**Principles (red-blue round-1+2+3):** do not ship a stable public WASM ABI without an explicit `wasm_preserve_exports` list; do not leave JS-side independent lane tables โ€” prefer whole-key chained mixing (`bla_lint_lanes` / harden refuse). **Do not** place plaintext seal/catalog JSON (`revision`, salts, certificate ciphertext) beside hardened outputs. Public compare targets must be **one-way** (SHA-256/HMAC/etc.); reversible ARX/Feistel digests as public `revision` are a key-recovery footgun (round-2 break โ€” **closed in round-3** when seal is digests-only). Enforce with `bla_lint_seal` / `bla lint-seal`; bankrupt harden **refuses** unless `allow_plaintext_seal` / `--allow-plaintext-seal`. Round-3 residual: even with one-way seals, **do not** leave ASCII WASM param/cipher magics (`R2SEAL`/`R3PARM`/`R3CIPH`) + clear salt/rounds/ciphertext in the data section; strip stable panel derive globals (`__vaultPanelDerive_*`); prefer **`self_seal`** for multi-artifact entitlement trees.
+**Principles (red-blue round-1+2+3):** do not ship a stable public WASM ABI without an explicit `wasm_preserve_exports` list; do not leave JS-side independent lane tables โ€” prefer whole-key chained mixing (`bla_lint_lanes` / harden refuse). **Do not** place plaintext seal/catalog JSON (`revision`, salts, certificate ciphertext) beside hardened outputs. Public compare targets must be **one-way** (SHA-256/HMAC/etc.); reversible ARX/Feistel digests as public `revision` are a key-recovery footgun (round-2 break โ€” **closed in round-3** when seal is digests-only). Enforce with `bla_lint_seal` / `bla lint-seal`; bankrupt harden **refuses** unless `allow_plaintext_seal` / `--allow-plaintext-seal`. Round-3 residual **gates**: `bla_lint_wasm_params` / `bla lint-wasm-params` โ€” bankrupt refuses clear `R2SEAL`/`R3PARM`/`R3CIPH`-class carriers unless `allow_wasm_clear_params`; `bla_lint_panel_derive` โ€” maximum/bankrupt **rewrites** `__vaultPanelDerive_*` to `_blaPd_*` unless `allow_stable_panel_derive`; bankrupt harden sets `selfSealRecommended` for multi-artifact trees (never auto for single-file) โ€” prefer **`self_seal`**. Full WASM data-section encryption remains a follow-up.
## Prerequisites (once)
diff --git a/.agents/skills/blind-llm-agents/references/format-javascript.md b/.agents/skills/blind-llm-agents/references/format-javascript.md
index 57660ea..1ca97db 100644
--- a/.agents/skills/blind-llm-agents/references/format-javascript.md
+++ b/.agents/skills/blind-llm-agents/references/format-javascript.md
@@ -51,3 +51,7 @@ Round-3 confirmed: SHA-256 (or HMAC) public `revision` **stops** seal-only ARX i
3. Strip or rename stable panel helpers such as `__vaultPanelDerive_*`, and avoid leaving classic FNV primes as readable literals in HTML bundles when they back entitlement tokens.
4. For multi-artifact gates (JS + WASM + HTML + seal), turn on **`self_seal`** so siblings cannot be freely swapped/instrumented.
+## Round-3 residual gates
+
+- `bla_lint_panel_derive` / `bla lint-panel-derive` flags stable `__vaultPanelDerive_*`; maximum/bankrupt protect rewrites to `_blaPd_*` unless `allow_stable_panel_derive`.
+- Multi-artifact trees: bankrupt harden reports `selfSealRecommended` โ€” pass `self_seal: true` (auto sibling bind on harden). Single-file stays opt-in only.
diff --git a/.agents/skills/blind-llm-agents/references/format-wasm.md b/.agents/skills/blind-llm-agents/references/format-wasm.md
index 002a99e..19fe01c 100644
--- a/.agents/skills/blind-llm-agents/references/format-wasm.md
+++ b/.agents/skills/blind-llm-agents/references/format-wasm.md
@@ -25,3 +25,7 @@ Export rename closes the public `mix`/`seal` hook surface. It does **not** hide
- Avoid shipping ASCII magics such as `R2SEAL` / `R3PARM` / `R3CIPH` followed by clear salt, round counts, invertible revisions, or certificate ciphertext.
- If the gate must load schedule params from WASM, encrypt them or bind the blob under **`self_seal`** with the entry module โ€” especially when a sibling `seal.json` already publishes one-way digests.
+## Round-3 residual gate
+
+- Run `bla_lint_wasm_params` / `bla lint-wasm-params` before shipping. Bankrupt harden refuses clear param/cipher magics unless `allow_wasm_clear_params`.
+- This is a **detection gate**, not data-section encryption.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d249a09..b40830e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
+- **Red/Blue round-3 ยท Writeback residual โ€” WASM param lint + panel rewrite + self_seal recommend:** CLI `bla lint-wasm-params` / MCP `bla_lint_wasm_params` detect clear `R3PARM`/`R3CIPH`/`R2SEAL`-class ASCII carriers with adjacent binary blobs; bankrupt harden/protect **refuse** unless `allowWasmClearParamCarriers` / `--allow-wasm-clear-params` / `allow_wasm_clear_params`. CLI `bla lint-panel-derive` / MCP `bla_lint_panel_derive` flag stable `__vaultPanelDerive_*` (and classic FNV primes as warning); maximum/bankrupt protect **rewrites** to seed-stable `_blaPd_*` unless `allowStablePanelDeriveAbi` / `--allow-stable-panel-derive` / `allow_stable_panel_derive`. Bankrupt harden sets `selfSealRecommended` for multi-artifact JS/WASM/HTML trees without auto-enabling single-file; `--self-seal` on harden auto-binds sibling paths. Audit surfaces the same WASM/panel findings. Skill **v1.5.6**. Full WASM data-section encryption remains a follow-up.
- **Red/Blue round-3 ยท Red writeback (skill):** one-way SHA-256 seals **close** the round-2 ARX-invert break; skill **v1.5.5** + format appendices document residual packaging โ€” WASM `R3PARM`/`R3CIPH`-class clear param/cipher carriers, stable `__vaultPanelDerive_*` / FNV literals, and prefer `self_seal` for multi-artifact entitlement trees. No emergency P0.
- **Red/Blue round-2 ยท Writeback P1 โ€” seal-commitment lint + bankrupt refuse:** CLI `bla lint-seal` / MCP `bla_lint_seal` detect plaintext seal sidecars and reversible public commitments (round-2 `seal.json` + ARX `revision` break). Bankrupt harden/protect refuse unless `allowPlaintextSeal` / `--allow-plaintext-seal` / `allow_plaintext_seal`. One-way SHA-256 seals pass. Skill v1.5.4 points at the new tool/switch.
diff --git a/docs/cli-and-mcp.md b/docs/cli-and-mcp.md
index 6a2c5cd..0980268 100644
--- a/docs/cli-and-mcp.md
+++ b/docs/cli-and-mcp.md
@@ -20,7 +20,7 @@ For coding agents, the **[`blind-llm-agents` skill](../.agents/skills/blind-llm-
## MCP Tools (`bla` Server)
-- `bla_harden`: Preferred one-sentence harden of a project directory (`directory`, `intensity`, `emit_manifest` default false, `llm_directives` default false, `weave_decoys` default false, `self_seal` default false, `wasm_preserve_exports`, `allow_lane_independent`, `allow_plaintext_seal`, `seed`, `dry_run` default false, `max_artifacts` default 64, `confirm_overwrite` default false, `output_directory` optional). The report carries `dryRun`, `truncated`, `maxArtifacts`, `wouldOverwrite`, and `outputDirectory`.
+- `bla_harden`: Preferred one-sentence harden of a project directory (`directory`, `intensity`, `emit_manifest` default false, `llm_directives` default false, `weave_decoys` default false, `self_seal` default false, `wasm_preserve_exports`, `allow_lane_independent`, `allow_plaintext_seal`, `allow_wasm_clear_params`, `allow_stable_panel_derive`, `seed`, `dry_run` default false, `max_artifacts` default 64, `confirm_overwrite` default false, `output_directory` optional). The report carries `dryRun`, `truncated`, `maxArtifacts`, `wouldOverwrite`, and `outputDirectory`.
- `bla_discover`: Read-only inventory using the same discovery as `bla_harden` (`directory`, `max_artifacts`) โ†’ `{ directory, artifacts[{path, relativePath, format}], truncated, maxArtifacts }`. Writes nothing.
- `bla_defend`: Full Counter-REA pipeline on a known path (`input_path`, `output_path`, `intensity`, `emit_manifest` default false, `llm_directives` default false, `weave_decoys` default false, `self_seal` default false, `wasm_preserve_exports`, `allow_lane_independent`, `allow_plaintext_seal`, `seed`, `in_place` default false, `confirm_overwrite` default false).
- `bla_audit`: Pre-flight REA exposure and token-economics audit (`path`).
@@ -28,6 +28,8 @@ For coding agents, the **[`blind-llm-agents` skill](../.agents/skills/blind-llm-
- `bla_verify`: Counter-REA invariant verification (`target_path`, `original_path`, optional honesty metadata `self_seal_enabled` / `wasm_export_rename_applied` / `numeric_template_leak_known` so `defenseScore` soft-caps match what protect actually ran; optional `summary_path` / `run_id` to correlate with a prior harden summary).
- `bla_lint_lanes`: Read-only lane-independence footgun lint (`path`) โ€” same engine as CLI `bla lint-lanes`.
- `bla_lint_seal`: Read-only seal-commitment lint (`path`) โ€” plaintext / reversible seal sidecars; same engine as CLI `bla lint-seal`.
+- `bla_lint_wasm_params`: Read-only WASM clear param/cipher carrier lint (`path`) โ€” `R3PARM`/`R3CIPH`/`R2SEAL`-class; same engine as CLI `bla lint-wasm-params`.
+- `bla_lint_panel_derive`: Read-only panel-derive ABI lint (`path`) โ€” stable `__vaultPanelDerive_*` / classic FNV; same engine as CLI `bla lint-panel-derive`.
- `bla_run_lookup`: Read-only harden-run correlation (`summary_path`, optional `run_id`). Summaries are **unsigned**; missing/mismatched id is an error.
- `bla_rea_drift`: Thin wrapper over `npm run verify:rea` / `scripts/verify-rea-constants.mjs`. Absent sibling REA โ†’ `status: unverified` (not red-team evidence).
- `bla_redteam_report`: Read (or `execute:true` re-run) `docs/redteam/empirical-rea-validation.json`. On-disk read โ†’ `status: available` (not a live REA verdict); `execute:true` โ†’ `pass`/`fail`; missing report / unready REA โ†’ `status: unverified`.