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(sqlite): enforce Node ^22.13.0 || >=24.0.0 engine floor and use sqlite-runtime loader

qybaihe63eaa2429f69
diff --git a/package.json b/package.json
index 7282e35..d4555dc 100644
--- a/package.json
+++ b/package.json
@@ -55,7 +55,7 @@
"DISCLAIMER.md"
],
"engines": {
- "node": ">=20.0.0"
+ "node": "^22.13.0 || >=24.0.0"
},
"scripts": {
"build": "tsc -p tsconfig.build.json && chmod +x dist/cli.js",
diff --git a/src/shields/formats/sqlite.ts b/src/shields/formats/sqlite.ts
index 2ce1b73..8a30f7a 100644
--- a/src/shields/formats/sqlite.ts
+++ b/src/shields/formats/sqlite.ts
@@ -1,19 +1,11 @@
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
-import { createRequire } from "node:module";
import { tmpdir } from "node:os";
import { join } from "node:path";
-import type { DatabaseSync as DatabaseSyncType } from "node:sqlite";
import { SeededPrng } from "../../core/prng.js";
+import { getDatabaseSyncClass } from "../../core/sqlite-runtime.js";
import type { ProtectionIntensity } from "../../core/types.js";
import { generateChaffPayloads } from "../chaff/chaff-generator.js";
-const require = createRequire(import.meta.url);
-
-function getDatabaseSyncClass(): typeof DatabaseSyncType {
- const mod = require("node:sqlite") as { DatabaseSync: typeof DatabaseSyncType };
- return mod.DatabaseSync;
-}
-
export interface SqliteInspectionSummary {
readonly validSqlite: boolean;
readonly tableNames: readonly string[];