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(harden): normalize relativePath separators to POSIX across platforms

Dery Ferdika32ffb3a2da71
diff --git a/src/engine/harden.ts b/src/engine/harden.ts
index b9b7a31..ea1c5b4 100644
--- a/src/engine/harden.ts
+++ b/src/engine/harden.ts
@@ -5,7 +5,7 @@ import {
statSync,
writeFileSync,
} from "node:fs";
-import { basename, dirname, join, relative, resolve } from "node:path";
+import { basename, dirname, join, relative, resolve, sep } from "node:path";
import { detectArtifactFormat } from "../core/detector.js";
import type { ArtifactFormat, ProtectionIntensity } from "../core/types.js";
import { BLA_IDENTITY } from "../identity.js";
@@ -181,7 +181,9 @@ function walkCollect(
out.push({
path: full,
format,
- relativePath: relative(root, full) || basename(full),
+ // Normalize to POSIX separators so reports, manifests, and MCP
+ // structuredContent stay platform-independent (`dist/app.js`).
+ relativePath: relative(root, full).split(sep).join("/") || basename(full),
});
}
}