๐ก๏ธ 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(2.0): Skill v1.5.23 layers R1โR12 refuse / recipe / honesty
qybaihe3d1f5329ceb5
diff --git a/.agents/skills/blind-llm-agents/SKILL.md b/.agents/skills/blind-llm-agents/SKILL.mdindex 7312a8c..11736e2 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.22"+ version: "1.5.23"---# 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`, `bla_lint_wasm_params`, `bla_lint_panel_derive`, `bla_lint_js_aes_unwrap`, `bla_lint_js_wasm_hydrate_dump`, `bla_lint_wasm_xor_mask_sidecar`, `bla_lint_wasm_seal_xor_known_plaintext`, โฆ) over inventing new+(`bla_harden`, `bla_defend`, `bla_weave_plan`, **`bla_lint`** (unified), `bla_lint_lanes`, `bla_lint_seal`, `bla_lint_wasm_params`, `bla_lint_panel_derive`, `bla_lint_js_aes_unwrap`, `bla_lint_js_wasm_hydrate_dump`, `bla_lint_wasm_xor_mask_sidecar`, `bla_lint_wasm_seal_xor_known_plaintext`, โฆ) over inventing newMCP surfaces.Use BLA whenever the user asks to harden a project against AI reverse-engineering@@ -24,7 +24,43 @@ 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+3+4+5+6+7+7b+8+9+10+11+12):** 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`**. Round-4 gates: `bla_lint_js_aes_unwrap` / `bla lint-js-aes-unwrap` โ bankrupt **refuses** JS wrap-key + `create*iv` + fixed sealed hdr (e.g. `d17ea004`) unless `allow_js_aes_unwrap` (gate only โ **not** white-box AES; prefer in-WASM unwrap). `bla_lint_panel_derive` flags `deriveLocal` (rewritten to `_blaPdLocal_*`) and **refuses** `deriveLocal` + plaintext `panelTokenSha256` offline-oracle packaging unless `allow_panel_offline_oracle` (rename is not a crypto fix โ scrub digests / avoid derive UI). `self_seal` embeds **expected sibling SHA-256 hard-fail** when siblings exist at protect time (harden processes JS last); opaque-seed entanglement alone does **not** gate entitlement control flow. Round-5 gates: `bla_lint_js_wasm_hydrate_dump` / `bla lint-js-wasm-hydrate-dump` โ bankrupt **refuses** JS that copies salt/rounds/cipher from `WebAssembly.Memory` after hydrate/instantiate unless `allow_js_wasm_hydrate_dump` (host memory dump needs **no** Node `create*iv`; export rename alone does not close this โ prefer keep ARX+certify **inside** WASM so params never re-enter JS). Round-6 product pattern: export `unlock(keyPtr,keyLen)->outLen` (or equivalent) so ARX+compare+decrypt stay in WASM; JS only writes key bytes and reads the result โ do **not** call hydrate then decode salt/rounds/cipher in JS (closes the round-5 host memory-dump residual under bankrupt defaults). Honesty: WASM reverse-engineering of the unlock body remains a theoretical surface; gates do not claim white-box secrecy. Round-6 **break residual**: do **not** store a plaintext XOR mask adjacent to a masked entitlement pack (`salt||rounds||expected-words||cipher`) in WASM data โ static unmask needs no key; combined with invertible ARX expected-state compare this recovers the prize (`bla_lint_wasm_xor_mask_sidecar` / `bla lint-wasm-xor-mask-sidecar`; bankrupt refuses unless `allow_wasm_xor_mask_sidecar`). Prefer key-dependent unmask and **one-way** commitments inside WASM (not reversible expected words). Round-7 product pattern: keep unlock-in-WASM; derive the XOR mask from the key inside `unlock` (do **not** embed a plaintext mask beside the blob); store a SHA-256 commitment of the ARX state for compare (not invertible expected words). Round-7 **break residual**: do **not** place public `seal.revision` (or other public digests) as plaintext under a repeating XOR mask in WASM data โ `revision` XOR `masked[8..40)` recovers the mask with no key; combined with an algebraically weak key-dependent mask KDF this recovers the prize (`bla_lint_wasm_seal_xor_known_plaintext` / `bla lint-wasm-seal-xor-known-plaintext`; bankrupt refuses unless `allow_wasm_seal_xor_known_plaintext`). Prefer a one-way mask KDF (e.g. SHA-256(key||i)) and keep public digests **out** of the masked plaintext prefix (or bind revision differently). Round-8 product pattern: derive the XOR mask with a **one-way** KDF such as `SHA-256(key[16])` (never an algebraically invertible byte mix); put an entropy/random pad โ **not** `seal.revision` โ in the masked pack prefix; keep the SHA-256 ARX commitment in a **separate clear data segment** (or otherwise outside the XOR-masked layout) so public digests cannot serve as XOR known-plaintext. Honesty: full WASM reverse-engineering of unlock can still recover algorithms; gates close packaging footguns, not white-box secrecy. Round-8 **red (NO PRIZE)**: SHA-256(key) mask KDF + commitment-outside-XOR **held** against the round-7 seal.revision XOR known-plaintext oracle and algebraic mask invert; residuals โ structural KP of fixed rounds/zero pad3 leaks only a few mask bytes; arity-2 decoy aliases; bankrupt JS decoys may false-positive `bla_lint_lanes` on hardened *output*; online guessing after full WASM RE remains a theoretical surface (not a packaging refuse gate). Round-9 product pattern: keep R8 SHA-256(key) mask KDF + commitment-outside-XOR; **randomize pack header `pad3`** and avoid fixed `rounds` immediates (seed-derived rounds in-range) so structural KP cannot leak `mask[4..7]`; emit bankrupt shadow-heap decoy shares/words in **non-lane-array shapes** (CSVโmap / 2+2 concat) so re-linting hardened output does not false-positive `bla_lint_lanes`; host probes all arity-2 exports for FLAG{-shaped results. Honesty: full WASM RE + online guessing remain theoretical; never embed harden `--seed` in artifacts. Round-9 **red (NO PRIZE)**: rand rounds/pad3 **closes** R8 structural KP; hardened `bla_lint_lanes` clean; R7 seal-XOR-KP / R6 sidecar / SHA-256 KDF invert / self-seal still **held**. Residuals โ full WASM RE + online guess vs commitment (P2); arity-2 alias forest (~251 unlock aliases + garbage first-hit decoy) mitigated by host FLAG-shape probe (P3); JS honeypot/canary โ WASM unlock (P3). No new bankrupt refuse lint (no prize packaging footgun under hard rules). Round-10 product pattern: keep R8โR9 crypto (SHA-256(key) mask KDF, commitment outside XOR, seed-derived rounds/pad3, entropyโ revision); **arity-2 hygiene** โ bankrupt long-name decoy aliases are **spread across exported function indices** (not piled onto funcIndex 0 / unlock); cleartext exports put the real unlock **first among arity-2** so renamed first-hit is not a mandatory garbage pitfall, while names still rename under bankrupt (no stable plaintext ABI without `wasm_preserve_exports`); host resolves by **type/arity `(i32,i32)->i32` + `FLAG{โฆ}` shape + `sha256(result)===seal.certificateSha256`** (not bare export name). Honesty: **JS honeypot/canary keys short-circuit in the host** and print an `UNLOCKED?` decoy that does **not** call WASM unlock and will **not** match `certificateSha256` if verified โ distinct from product unlock (document; not a packaging refuse). Gates still do **not** claim white-box secrecy; P2 residual remains full WASM RE + online/SMT vs commitment. Round-10 **red (NO PRIZE)**: arity-2 alias **spread held** (unlock wrong-key return `0` indistinguishable from stub idx; not all aliases = unlock); R8โR9 crypto surfaces (SHA-256 KDF, commitment-outside-XOR, rand rounds/pad3, seal-XOR-KP, sidecar, self-seal, lanes clean) still **held**; host FLAG+cert is a correct but impractical online oracle. Residual โ bankrupt rename preserves cleartext **export order**, so โunlock first among arity-2โ still makes first arity-2 the unlock body (RE shortcut, not key recovery): prefer **shuffle export order** independently of alias-index spread while host keeps probing all arity-2 + cert. No new bankrupt refuse lint (no prize packaging footgun). Round-11 product pattern: keep R8โR10 crypto + arity-2 alias spread + host arity/FLAG/certificate contract; **independently shuffle WASM export-section order** (seed-derived at maximum/bankrupt, after rename + decoy append) so โfirst arity-2โ is **not** a stable pointer to the unlock body โ host must keep probing all arity-2 candidates + `sha256===certificateSha256` (never rely on export order). Cleartext fixtures should also avoid advertising unlock-first export order. Honesty: full WASM RE + online/SMT vs commitment remains the P2 surface; gates still do not claim white-box secrecy. No new bankrupt refuse lint. Round-11 **red (NO PRIZE)**: independent export-order shuffle **held** โ first func export / first arity-2 is **not** unlock body (lab: unlock export-order position โซ 0); alias spread + R8โR10 crypto (SHA-256 KDF, commitment-outside-XOR, rand rounds/pad3, seal-XOR-KP, sidecar, self-seal, lanes clean) still **held**; host FLAG+cert oracle 500ร โ 0 prize; shuffle not predictable without `--seed` (absent from artifacts). Residual โ P2 full WASM RE + online/SMT vs commitment only; optional P3 unlock stably at func idx 0 (body index, not export order). No new bankrupt refuse lint (no prize packaging footgun). Round-12 product pattern: keep R8โR11 crypto + arity-2 alias spread + export-order shuffle + host arity/FLAG/certificate contract; **scatter the unlock function body index** (seed-derived pad/decoy funcs prepended in cleartext assembly so unlock is not stably at func idx 0 โ body index, not only export order); engine bankrupt decoy aliases **prefer host-visible arity-2** exports so arity-1 (e.g. seal) does not consume alias budget. Honesty: full WASM RE + online/SMT vs commitment remains the P2 surface; gates still do not claim white-box secrecy. No new bankrupt refuse lint. Round-12 **red (NO PRIZE)**: unlock body-index scatter **held** โ unlock body โ func idx 0 (lab idx 6); first func export / first arity-2 โ unlock; arity-1 seal alias budget **0 decoys** (own export only); R8โR11 crypto + export shuffle + self-seal + lanes clean still **held**; host FLAG+cert oracle 500ร โ 0 prize. Residual โ P2 full WASM RE + online/SMT vs commitment; among exported arity-2, **body-size fingerprint** (largest body โ unlock) is a white-box RE convenience (not key recovery) โ protect does not rewrite code-section sizes. Diminishing returns: further ABI/index hygiene is P3 vs P2 crypto RE. No new bankrupt refuse lint (no prize packaging footgun).+**Principles (red-blue R1โR12 โ MCP/Skill 2.0):**++### A. Bankrupt refuse gates (engine + MCP โ call `bla_lint` first)++| Gate | Tool | Allow override (lab only) |+| :--- | :--- | :--- |+| Independent lane tables | `bla_lint_lanes` | `allow_lane_independent` |+| Plaintext / reversible seal JSON | `bla_lint_seal` | `allow_plaintext_seal` |+| Clear WASM `R2SEAL`/`R3PARM`/`R3CIPH` | `bla_lint_wasm_params` | `allow_wasm_clear_params` |+| JS AES wrap-key + create*iv + fixed hdr | `bla_lint_js_aes_unwrap` | `allow_js_aes_unwrap` |+| Panel `deriveLocal` + `panelTokenSha256` oracle | `bla_lint_panel_derive` | `allow_panel_offline_oracle` |+| JSโWASM hydrate salt/rounds/cipher dump | `bla_lint_js_wasm_hydrate_dump` | `allow_js_wasm_hydrate_dump` |+| WASM XOR-mask beside masked pack | `bla_lint_wasm_xor_mask_sidecar` | `allow_wasm_xor_mask_sidecar` |+| `seal.revision` as XOR known-plaintext | `bla_lint_wasm_seal_xor_known_plaintext` | `allow_wasm_seal_xor_known_plaintext` |++Prefer **one** project scan: MCP `bla_lint` / CLI `bla lint .` (schema `bla-packaging-gates/v1`). Individual `bla_lint_*` remain for single-file drills. Bankrupt harden **refuses** the six carrier/JS/WASM gates unless the matching allow flag is set; lanes/panel also refuse at protect-time.++Also: do **not** ship a stable public WASM ABI without explicit `wasm_preserve_exports`; maximum/bankrupt **rewrites** `__vaultPanelDerive_*` / `deriveLocal` unless `allow_stable_panel_derive`. Multi-artifact trees: bankrupt sets `selfSealRecommended` โ prefer **`self_seal`** (sibling SHA-256 **hard-fail**; opaque-seed alone does not gate entitlement).++### B. Product recipe principles (Skill layer โ not new refuse lints)++Held across R8โR12 (NO PRIZE). Keep in gate design; do **not** invent packaging refuse lints for these:++- Unlock **inside WASM** (`unlock(keyPtr,keyLen)->outLen`); JS only writes key / reads result UTF-8.+- Mask via **one-way** KDF (`SHA-256(key[16])`), never algebraically invertible byte mix.+- Keep public digests (**`seal.revision`**) **out** of XOR-masked plaintext; commitment in a separate clear segment.+- Randomize pack header `pad3` + seed-derived rounds (close structural KP).+- Host resolves unlock by **arity + `FLAG{โฆ}` shape + `sha256===certificateSha256`**, never export name/order.+- JS honeypot/canary โ WASM unlock (decoy must fail certificate check).++### C. Engine defaults already on (hygiene, not refuse)++At maximum/bankrupt WASM protect: export rename, **arity-2-preferring decoy alias spread**, **independent export-order shuffle**, honesty fields `wasmExportRenameApplied` / `wasmExportOrderShuffled` / `wasmExportDecoysInjected`. Cleartext may also scatter unlock body index (recipe).++### D. Honesty residual (do not water refuse lints)++Gates close **packaging** footguns. They do **not** claim white-box secrecy against full WASM RE + online/SMT vs SHA-256 commitment (R8โR12 P2). Body-size fingerprinting among arity-2 exports is P3 / diminishing returns โ not a new refuse gate. `defenseScore` is an honest soft-cap, not preimage hardness.## Prerequisites (once)@@ -76,6 +112,7 @@ Optional args (safe defaults): `intensity` (bankrupt), `emit_manifest` (false),| Named artifact | **`bla_defend`** (or granular `bla_audit` โ `bla_protect` โ `bla_verify`) || Inventory only | **`bla_discover`** || Structural decoys (esp. Python) | Resource `bla://directives/weave-decoy` โ `bla_weave_plan` โ `weave_decoys: true` |+| Packaging footguns before harden (entitlement tree) | **`bla_lint`** `{ "directory": "." }` (CLI: `bla lint .`) โ unified R1โR7+lanes/panel || Custom license/activation gate review | **`bla_lint_lanes`** `{ "path": "<gate.js>" }` (CLI: `bla lint-lanes`) || Re-check a prior harden run | **`bla_run_lookup`** `{ "summary_path": "<.bla-hardened or summary.json>", "run_id": "โฆ" }` || REA constant drift / empirical report | **`bla_rea_drift`** / **`bla_redteam_report`** (unverified if REA absent; on-disk read โ available) |@@ -107,6 +144,7 @@ npx -y bla-agents@latest setupnpx -y bla-agents@latest doctornpx -y bla-agents@latest harden .npx -y bla-agents@latest harden . --weave-decoys --self-seal+npx -y bla-agents@latest lint .npx -y bla-agents@latest lint-lanes path/to/gate.jsnpx -y bla-agents@latest lint-js-wasm-hydrate-dump path/to/license.cjsnpx -y bla-agents@latest defend /absolute/path/to/target --manifest --jsondiff --git a/.agents/skills/blind-llm-agents/references/format-wasm.md b/.agents/skills/blind-llm-agents/references/format-wasm.mdindex fcba9d6..09af62a 100644--- a/.agents/skills/blind-llm-agents/references/format-wasm.md+++ b/.agents/skills/blind-llm-agents/references/format-wasm.md@@ -33,3 +33,20 @@ Export rename closes the public `mix`/`seal` hook surface. It does **not** hide## Sealed blobs still need JS honesty (red-blue round-4)Encrypting WASM data (no clear `R3PARM`) closes the ASCII-carrier lint. If the **JS loader** still does `Buffer.from(WRAP_KEY_HEX, "hex")` + `createDecipheriv` against a fixed hdr, Node instrumentation recovers params. Run `bla_lint_js_aes_unwrap` on the loader; bankrupt refuses that footgun. BLA does **not** claim white-box AES.+++## Unlock-in-WASM + mask hygiene (red-blue R5โR12)++Export rename closes public `mix`/`seal` hooks. It does **not** replace careful entitlement packaging:++| Round | Do | Lint / engine |+| :--- | :--- | :--- |+| R5โR6 | Keep ARX+compare+decrypt **inside** `unlock`; JS must not hydrateโdump salt/rounds/cipher | `bla_lint_js_wasm_hydrate_dump` |+| R6 | Never store plaintext XOR mask beside masked pack | `bla_lint_wasm_xor_mask_sidecar` |+| R7 | Never put `seal.revision` under repeating XOR mask; use one-way mask KDF | `bla_lint_wasm_seal_xor_known_plaintext` |+| R8+ | `SHA-256(key)` mask; commitment **outside** XOR; entropy pad โ revision | Skill recipe (R7 lint covers KP) |+| R9 | Seed-derived rounds + nonzero pad3 | Skill recipe |+| R10โR12 | Engine: arity-2 alias spread + export-order shuffle + prefer arity-2 decoys | protect defaults |+| Host | Resolve by arity + FLAG shape + `certificateSha256`, never first export | Skill recipe |++Project scan: `bla_lint` / `bla lint .`. Honesty: full WASM RE + online/SMT vs commitment remains possible โ gates โ white-box.diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 20e7974..633d862 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+- **Unified packaging gates (`bla lint` / MCP `bla_lint`):** one project scan over every R1โR7 bankrupt refuse lint plus lane/panel discovery (`bla-packaging-gates/v1`). `hardenProject` shares `evaluateHardenProjectPackagingBlocks`. Skill guide **v1.5.23** layers refuse gates / product recipes / honesty residual from red-blue R1โR12. WASM protect honesty surfaces `wasmExportOrderShuffled` / `wasmExportDecoysInjected`. MCP parity includes `allow_wasm_seal_xor_known_plaintext` on harden/defend/protect.- **Red/Blue round-4 ยท Writeback โ JS AES unwrap lint + panel offline-oracle gate:** CLI `bla lint-js-aes-unwrap` / MCP `bla_lint_js_aes_unwrap` detect hex/base64 wrap-key material + `createDecipheriv`/`createCipheriv` + fixed sealed hdr (e.g. `d17ea004`). Bankrupt harden/protect **refuse** unless `allowJsAesUnwrap` / `--allow-js-aes-unwrap` / `allow_js_aes_unwrap`. Gate only โ **not** white-box AES. `bla_lint_panel_derive` / CLI also flag stable `deriveLocal` (maximum/bankrupt rewrite to `_blaPdLocal_*`) and `deriveLocal` + plaintext `panelTokenSha256` offline-oracle packaging (same-file or sibling `seal.json`); bankrupt **refuses** the oracle combo unless `allowPanelOfflineOracle` / `--allow-panel-offline-oracle` / `allow_panel_offline_oracle`. Skill **v1.5.7**. Self-seal sibling SHA-256 hard-fail remains from `c2ec868`.- **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.diff --git a/STATE.md b/STATE.mdindex 0bd86b3..14116c1 100644--- a/STATE.md+++ b/STATE.md@@ -87,6 +87,10 @@ Outside the repo, `npm pack` โ install tarball โ isolated `HOME`:- Shipped **v1.4.6** counter: `android-r8.ts` + unsigned-APK wiring + identityconstants + `verify:rea` drift entries.+## Red-blue packaging gates (R1โR12 โ 2.0)++Unified `bla lint` / MCP `bla_lint` (`bla-packaging-gates/v1`) aggregates every bankrupt refuse lint from red-blue rounds 1โ7; R8โR12 SHA-256 KDF / commitment-outside-XOR / arity+export hygiene live as Skill recipes + WASM protect defaults. Honesty residual: full WASM RE + online/SMT โ **not** a new refuse lint. Skill **v1.5.23**. Draft PR #77 โ do not merge/ship 2.0 without maintainer approval.+## Nightly roadmap remaining1. ~~**Self-seal / defenseScore honesty (#40)**~~ โ landed soft-caps + opt-in `--self-seal` / MCP `self_seal` / `.blarc selfSeal` (batch 2026-11-02). Remaining: deeper onefile/peel score model.diff --git a/docs/cli-and-mcp.md b/docs/cli-and-mcp.mdindex 6858085..ba73d29 100644--- a/docs/cli-and-mcp.md+++ b/docs/cli-and-mcp.md@@ -8,6 +8,7 @@ For coding agents, the **[`blind-llm-agents` skill](../.agents/skills/blind-llm-| :--- | :--- || `npx bla-agents setup` | Auto-registers the `bla` MCP server and `blind-llm-agents` skill with Claude Code, Cursor, Codex, Windsurf, Gemini CLI, and Antigravity. || `npx bla-agents harden .` | **Default one-command UX**: auto-discover build outputs and run audit โ protect โ verify (bankrupt). Prefer over `defend` when you have a project directory. Agent guide: [`blind-llm-agents` skill](../.agents/skills/blind-llm-agents/SKILL.md). |+| `npx bla-agents lint .` | **Unified packaging-footgun scan** (`bla-packaging-gates/v1`): all R1โR7 refuse lints + lanes/panel. Exit 2 when bankrupt would refuse. Writes nothing. || `npx bla-agents defend <target> [--manifest] [--llm-directives] [--weave-decoys]` | **5-stage pipeline** on a known path: `inspect-release` โ `audit` โ `protect` โ `verify` โ optional **unsigned** `.bla-manifest.json` (opt-in). Risky LLM directive layers stay off unless `--llm-directives`. Structural weave decoys stay off unless `--weave-decoys`. || `npx bla-agents harden . [--weave-decoys]` | Same as `harden` with opt-in structural weave (`weave_decoys`). || `npx bla-agents inspect-release <target>` | Read-only local scan for embedded `.map` (`sourcesContent`) and sourceMappingURL references. |@@ -26,13 +27,15 @@ For coding agents, the **[`blind-llm-agents` skill](../.agents/skills/blind-llm-- `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`, `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`: **DEFAULT** packaging-footgun project scan (`directory`, `intensity`, allow_* flags) โ `bla-packaging-gates/v1` (findings + blocking + honestyNote). Prefer over calling eight separate lints. Same engines as CLI `bla lint`.- `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_*` / `deriveLocal` / `panelTokenSha256` oracle; same engine as CLI `bla lint-panel-derive`.- `bla_lint_js_aes_unwrap`: Read-only JS AES wrap-key unwrap lint (`path`) โ wrap-key + create*iv + fixed hdr; same engine as CLI `bla lint-js-aes-unwrap`. Gate only โ not white-box AES.- `bla_lint_js_wasm_hydrate_dump`: Read-only JSโWASM hydrate param-dump lint (`path`) โ memory.buffer + salt/rounds/cipher after hydrate; same engine as CLI `bla lint-js-wasm-hydrate-dump`. Prefer in-WASM ARX+certify.-- `bla_lint_wasm_xor_mask_sidecar`: Read-only WASM XOR-mask sidecar lint (`path`) โ masked entitlement pack beside plaintext 32-byte mask in WASM data; bankrupt refuses unless `allow_wasm_xor_mask_sidecar`.+- `bla_lint_wasm_xor_mask_sidecar`: Read-only WASM XOR-mask sidecar lint (`path`) โ masked entitlement pack beside plaintext 32-byte mask in WASM data; bankrupt refuses unless `allow_wasm_xor_mask_sidecar`, `allow_wasm_seal_xor_known_plaintext`.+- `bla_lint_wasm_seal_xor_known_plaintext`: Read-only seal.revision XOR known-plaintext lint (`path`, optional `seal_path`) โ bankrupt refuses unless `allow_wasm_seal_xor_known_plaintext`.- `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`.