🛡️ 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.
JavaScript adversarial-aiclaude-codecursorelectron-securityllm-securitymcpmcp-serverobfuscationreverse-engineeringwebassembly
docs: round-2 P1 seal lint, bankrupt refuse, skill v1.5.4
qybaihe95c689e11a79
diff --git a/.agents/skills/blind-llm-agents/SKILL.md b/.agents/skills/blind-llm-agents/SKILL.mdindex 91047e0..bea51af 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 inventnew MCP tools. Default verb: bla_harden. Refuse crack/RE of third-party software.metadata:- version: "1.5.3"+ version: "1.5.4"---# 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`, …) over inventing new+(`bla_harden`, `bla_defend`, `bla_weave_plan`, `bla_lint_lanes`, `bla_lint_seal`, …) over inventing newMCP 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, orattack playbooks against software they do not own.-**Principles (red-blue round-1+2):** 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 — harden does not protect sidecars. 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).+**Principles (red-blue round-1+2):** 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). Enforce with `bla_lint_seal` / `bla lint-seal`; bankrupt harden **refuses** unless `allow_plaintext_seal` / `--allow-plaintext-seal`.## Prerequisites (once)diff --git a/.agents/skills/blind-llm-agents/references/format-javascript.md b/.agents/skills/blind-llm-agents/references/format-javascript.mdindex e5a1965..6e6077d 100644--- a/.agents/skills/blind-llm-agents/references/format-javascript.md+++ b/.agents/skills/blind-llm-agents/references/format-javascript.md@@ -39,3 +39,5 @@ Rules of thumb:1. Prefer **one-way** commitments (`SHA-256` / HMAC) for public `revision` / compare digests. Custom reversible ARX/Feistel “digests” invert to the key when salt+rounds are public.2. Encrypt or omit seal sidecars in the shipped tree; or fold them under **`self_seal`** / a sealed blob bound to the entry module.3. Dual-publish (JSON + WASM `R2SEAL` data) without encryption doubles the same exposure.++**Engine gate:** `bla_lint_seal` / CLI `bla lint-seal` flags reversible plaintext seals. At **bankrupt**, harden/protect **refuse** unless `allow_plaintext_seal` / `--allow-plaintext-seal` / `.blarc` `"allowPlaintextSeal": true` (lab fixtures only). One-way SHA-256 seals without invertible ARX params pass.diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d3e8d1a..6d7cb8f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,8 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## [Unreleased]+### Added+- **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.+### Changed-- **Red/Blue round-2 · Writeback (skill):** Skill guide **v1.5.3** + `format-javascript.md` — plaintext seal/catalog sidecars are unprotected by harden; public compare digests must be one-way (reversible ARX/`revision` was the round-2 key-recovery break). Round-1 P0 (WASM export rename + lane refuse) held against the old vectors.+- **Red/Blue round-2 · Writeback (skill, superseded in part by P1 engine lint):** Skill guide **v1.5.3** + `format-javascript.md` — plaintext seal/catalog sidecars are unprotected by harden; public compare digests must be one-way (reversible ARX/`revision` was the round-2 key-recovery break). Round-1 P0 (WASM export rename + lane refuse) held against the old vectors.- **Red/Blue round-1 · Writeback P0 — WASM export rename default:** at `maximum`/`bankrupt`, `protectWasmBinary` renames **all** non-preserved exports (not only `__*` / `debug_*`). Keeping a stable public ABI requires explicit `wasmPreserveExports` / `--wasm-preserve-exports` / `wasm_preserve_exports`. Optional `renameInternalOnly: true` for the weaker pass.- **Red/Blue round-1 · Writeback P0 — lane-independence is error + harden refuse:** `bla lint-lanes` / `bla_lint_lanes` findings are severity **error**; protect/defend/harden refuse JS/TS that looks lane-independent (including per-byte WASM mix/seal oracles) unless `allowLaneIndependentGates` / `--allow-lane-independent` / `allow_lane_independent`. Skill v1.5.2 principles: no silent stable WASM ABI; no JS independent lane tables; prefer whole-key mixing.diff --git a/docs/cli-and-mcp.md b/docs/cli-and-mcp.mdindex 89b20be..6a2c5cd 100644--- a/docs/cli-and-mcp.md+++ b/docs/cli-and-mcp.md@@ -20,13 +20,14 @@ 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`, `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`, `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`, `seed`, `in_place` default false, `confirm_overwrite` default false).+- `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`).-- `bla_protect`: Granular shield injection (`input_path`, `output_path`, `intensity`, `seed`, `llm_directives` default false, `weave_decoys` default false, `self_seal` default false, `wasm_preserve_exports`, `in_place` default false, `honey_source_maps` default true, `confirm_overwrite` default false).+- `bla_protect`: Granular shield injection (`input_path`, `output_path`, `intensity`, `seed`, `llm_directives` default false, `weave_decoys` default false, `self_seal` default false, `wasm_preserve_exports`, `allow_lane_independent`, `allow_plaintext_seal`, `in_place` default false, `honey_source_maps` default true, `confirm_overwrite` default false).- `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_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`.@@ -52,6 +53,8 @@ WASM public ABI preserve list (issue #40.3 / red-blue round-1): CLI `--wasm-presHeuristic **lane-independence lint** (issue #40.1 / red-blue round-1): CLI `bla lint-lanes <file>` and MCP `bla_lint_lanes` emit severity **error** when gate code looks like independent per-lane checks. Harden/defend/protect **refuse** unless CLI `--allow-lane-independent` / MCP `allow_lane_independent` / `.blarc` `"allowLaneIndependentGates": true`. Prefer whole-key chained mixing.+Heuristic **seal-commitment lint** (red-blue round-2): CLI `bla lint-seal <file>` and MCP `bla_lint_seal` flag plaintext seal/entitlement JSON and reversible public commitments (`scheduleSalt`+`rounds`+`revision` without a one-way algorithm). Severity **error** findings make **bankrupt** harden/protect **refuse** unless CLI `--allow-plaintext-seal` / MCP `allow_plaintext_seal` / `.blarc` `"allowPlaintextSeal": true`. One-way SHA-256/HMAC digests pass. Full seal-encrypt/bind remains a follow-up; refusal closes the round-2 footgun by default.+### MCP Resources- `bla://directives/weave-decoy` — weave-decoy theory + executor checklist (Markdown).