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(skill): v1.5 run evidence and REA unverified principles

qybaihef1562eab0481
diff --git a/.agents/skills/blind-llm-agents/SKILL.md b/.agents/skills/blind-llm-agents/SKILL.md
index b9bba9c..24df86a 100644
--- a/.agents/skills/blind-llm-agents/SKILL.md
+++ b/.agents/skills/blind-llm-agents/SKILL.md
@@ -7,7 +7,7 @@ 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.4.0"
+ version: "1.5.0"
---
# BLA: Blind LLM Agents
@@ -56,6 +56,11 @@ Optional args (safe defaults): `intensity` (bankrupt), `emit_manifest` (false),
`wouldOverwrite`, ask, then retry with `confirm_overwrite: true` (or a new path).
Same rule for `in_place: true` (overwrites the input).
- Report writes from the tool receipt (`writeReceipt` / `wouldOverwrite`), not guesses.
+- After a successful harden/defend/protect, keep the returned unsigned `runId` (and
+ harden `summaryPath`). Re-check later with `bla_run_lookup` or `bla_verify` +
+ `summary_path`/`run_id` β€” never invent a run id.
+- `bla_rea_drift` / `bla_redteam_report` may return `status: unverified` when sibling
+ REA is absent; treat that as **not proven**, never as a pass.
## Decision tree (short)
@@ -66,6 +71,8 @@ Optional args (safe defaults): `intensity` (bankrupt), `emit_manifest` (false),
| Inventory only | **`bla_discover`** |
| Structural decoys (esp. Python) | Resource `bla://directives/weave-decoy` β†’ `bla_weave_plan` β†’ `weave_decoys: true` |
| 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) |
| Format-specific knobs | Load the matching appendix under `references/` |
## FORBIDDEN
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abc3f36..d3a2e6d 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
+- **MCP/Skill 2.0 stage C (evidence + REA observability):** harden/defend/protect results carry a stable unsigned `runId`; `hardenProject` writes `bla-harden-summary/v2` with `runId` + `signature: "unsigned"`; read-only `bla_run_lookup` and optional `bla_verify` `summary_path`/`run_id` correlation (bad/missing id β†’ explicit error). Thin MCP wrappers `bla_rea_drift` / `bla_redteam_report` over existing scripts β€” absent REA or missing report β†’ `status: unverified` with `isError` (never silent pass). Skill guide **v1.5** documents run lookup + unverified principles.
- **MCP/Skill 2.0 stage B (CLI↔MCP parity):** `bla_lint_lanes` (same engine as `bla lint-lanes`); `in_place` on `bla_protect`/`bla_defend` (still gated by `confirm_overwrite`); `honey_source_maps` on `bla_protect`; `output_directory` on `bla_harden`; `bla_verify` honesty metadata (`self_seal_enabled`, `wasm_export_rename_applied`, `numeric_template_leak_known`) so soft-caps match protect-side facts.
- **Skill format appendices:** `references/format-{javascript,wasm,python,android}.md`; skill guide v1.4 keeps a short decision tree and drops install-breaking `../../../docs` links (weave via `bla://directives/weave-decoy`). Setup/doctor install+hash the full bundle including appendices.
- **Agent write safety (MCP/Skill 2.0, stage A):** read-only `bla_discover`; `bla_harden` `dry_run` (CLI `harden --dry-run`) writes zero bytes and reports `truncated` / `wouldOverwrite`; `bla_harden` / `bla_defend` / `bla_protect` refuse to overwrite existing outputs without `confirm_overwrite: true` and return a `writeReceipt`.
diff --git a/docs/cli-and-mcp.md b/docs/cli-and-mcp.md
index 3f9a998..b8fca9e 100644
--- a/docs/cli-and-mcp.md
+++ b/docs/cli-and-mcp.md
@@ -25,8 +25,11 @@ For coding agents, the **[`blind-llm-agents` skill](../.agents/skills/blind-llm-
- `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_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_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).
+- `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_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`. Missing report / unready REA β†’ `status: unverified`.
- `bla_benchmark`: Runs the 8-target showcase benchmark suite.
- `bla_emit_headers`: Generates C/C++, Rust, or Go defense headers (`language`, `intensity`).
- `bla_doctor`: Diagnostics for BLA engines and agent client registrations; also reports `skillMissingFiles` / `skillModifiedFiles` (format appendices under `references/` included).
diff --git a/tests/skill-guide-contents.test.ts b/tests/skill-guide-contents.test.ts
index 049a4f2..876daa4 100644
--- a/tests/skill-guide-contents.test.ts
+++ b/tests/skill-guide-contents.test.ts
@@ -11,9 +11,9 @@ const skillDir = path.resolve(
const skillPath = path.join(skillDir, "SKILL.md");
describe("blind-llm-agents skill guide contents", () => {
- it("ships v1.4+ short decision guide with write-safety and lint-lanes", () => {
+ it("ships v1.5+ short decision guide with write-safety, lint-lanes, and run evidence", () => {
const text = fs.readFileSync(skillPath, "utf8");
- expect(text).toMatch(/metadata:\s*\n\s*version:\s*"1\.4\.\d+"/);
+ expect(text).toMatch(/metadata:\s*\n\s*version:\s*"1\.5\.\d+"/);
expect(text).toContain("bla_harden");
expect(text).toContain("npx bla-agents@latest harden .");
expect(text).toContain("weave_decoys");
@@ -29,6 +29,10 @@ describe("blind-llm-agents skill guide contents", () => {
expect(text).toContain("dry_run");
expect(text).toContain("confirm_overwrite");
expect(text).toContain("in_place");
+ expect(text).toContain("bla_run_lookup");
+ expect(text).toContain("bla_rea_drift");
+ expect(text).toContain("bla_redteam_report");
+ expect(text).toMatch(/unverified/i);
// No brittle repo-relative ../../../docs links that break after setup install.
expect(text).not.toMatch(/\.\.\/\.\.\/\.\.\/docs\//);
});