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(release): sync version metadata across package metadata (#57)

Dery Ferdika3c18b1460b6a
diff --git a/challenge/v6/SEAL.json b/challenge/v6/SEAL.json
index 62b97a8..cf44b7c 100644
--- a/challenge/v6/SEAL.json
+++ b/challenge/v6/SEAL.json
@@ -1,7 +1,7 @@
{
"schema": "bla-crackme-v6-seal/v2",
"mode": "release",
- "blaVersion": "1.6.1",
+ "blaVersion": "1.6.4",
"recipe": "npm run crackme:build (hardenProject == `bla harden <dir> --intensity bankrupt --seed <seed>`)",
"seed": "bla-crackme-v6-harden-native-2026-11",
"intensity": "bankrupt",
diff --git a/challenge/v7/SEAL.json b/challenge/v7/SEAL.json
index 149e835..c5feed9 100644
--- a/challenge/v7/SEAL.json
+++ b/challenge/v7/SEAL.json
@@ -2,7 +2,7 @@
"schema": "bla-crackme-v7-seal/v1",
"mode": "release",
"product": "Meridian",
- "blaVersion": "1.6.3",
+ "blaVersion": "1.6.4",
"hardenSeedLabel": "bound-at-build-into-opaque-predicates",
"intensity": "bankrupt",
"llmDirectives": false,
diff --git a/package-lock.json b/package-lock.json
index 7b689dc..ddf8c9f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "bla-agents",
- "version": "1.6.3",
+ "version": "1.6.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "bla-agents",
- "version": "1.6.3",
+ "version": "1.6.4",
"license": "MIT",
"dependencies": {
"@babel/generator": "^7.26.0",
diff --git a/scripts/crackme/v7-seal.mjs b/scripts/crackme/v7-seal.mjs
index 8d1d395..760bd9c 100644
--- a/scripts/crackme/v7-seal.mjs
+++ b/scripts/crackme/v7-seal.mjs
@@ -35,6 +35,10 @@ const seal = JSON.parse(readFileSync(SEAL, "utf8"));
must(seal.schema === "bla-crackme-v7-seal/v1", "bad schema");
must(seal.intensity === "bankrupt" && seal.llmDirectives === false && seal.emitManifest === false, "knobs");
must(seal.product === "Meridian", "product");
+// The seal must record the BLA version that produced the artifacts — a stale
+// blaVersion means the hardened bundle drifted behind a version bump.
+const pkgVersion = String(JSON.parse(readFileSync(join(ROOT, "package.json"), "utf8")).version);
+must(seal.blaVersion === pkgVersion, `SEAL blaVersion ${seal.blaVersion} != package.json ${pkgVersion}`);
for (const rel of [...MODULES, "data/catalog.json"]) {
const buf = readFileSync(join(DIST, rel));
diff --git a/scripts/sync-version.mjs b/scripts/sync-version.mjs
index 9fd6512..3750612 100644
--- a/scripts/sync-version.mjs
+++ b/scripts/sync-version.mjs
@@ -5,6 +5,7 @@ import { resolve } from "node:path";
const root = resolve(import.meta.dirname, "..");
const pkgPath = resolve(root, "package.json");
const identityPath = resolve(root, "src/identity.ts");
+const lockPath = resolve(root, "package-lock.json");
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
const version = String(pkg.version);
@@ -21,3 +22,23 @@ if (updated !== identityText) {
} else {
console.log(`BLA_IDENTITY.version already at ${version}`);
}
+
+// Keep package-lock.json's root version in lockstep — `npm version` normally
+// does this, but manual bumps / partial releases leave the lockfile behind and
+// the drift silently passes CI (npm ci tolerates a root-version mismatch).
+try {
+ const lock = JSON.parse(readFileSync(lockPath, "utf8"));
+ const rootEntry = lock.packages?.[""];
+ const stale =
+ lock.version !== version || (rootEntry && rootEntry.version !== version);
+ if (stale) {
+ lock.version = version;
+ if (rootEntry) rootEntry.version = version;
+ writeFileSync(lockPath, JSON.stringify(lock, null, 2) + "\n", "utf8");
+ console.log(`Synced package-lock.json version -> ${version}`);
+ } else {
+ console.log(`package-lock.json already at ${version}`);
+ }
+} catch (err) {
+ console.warn(`Skipped package-lock.json sync: ${err instanceof Error ? err.message : String(err)}`);
+}