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.

fix(test): guard optional artifacts access in write-safety typecheck

qybaihef471f2316c82
diff --git a/tests/agent-write-safety.test.ts b/tests/agent-write-safety.test.ts
index f08e043..031f654 100644
--- a/tests/agent-write-safety.test.ts
+++ b/tests/agent-write-safety.test.ts
@@ -111,7 +111,7 @@ describe("read-only discover + zero-write dry-run", () => {
const rep = r.structuredContent;
expect(rep.dryRun).toBe(true);
expect(rep.discoveredCount).toBe(2);
- expect(rep.artifacts[0].outputPath).toContain(".bla-hardened");
+ expect(rep.artifacts?.[0]?.outputPath).toContain(".bla-hardened");
expect(rep.wouldOverwrite).toEqual([]);
expect(existsSync(join(root, ".bla-hardened"))).toBe(false);
expect(snapshot(root)).toEqual(before);