🛡️ 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.
JavaScript adversarial-aiclaude-codecursorelectron-securityllm-securitymcpmcp-serverobfuscationreverse-engineeringwebassembly
feat(lint): warn on public materialization seed / key digest in seal sidecars
qybaihe55c1cc782cc7
diff --git a/src/engine/seal-commitment-lint.ts b/src/engine/seal-commitment-lint.tsindex 7b77e9a..94fd4d5 100644--- a/src/engine/seal-commitment-lint.ts+++ b/src/engine/seal-commitment-lint.ts@@ -21,7 +21,9 @@ export const SEAL_COMMITMENT_SCHEMA = "bla-seal-commitment-lint/v1" as const;export type SealCommitmentFindingId =| "plaintext-seal-sidecar"| "reversible-public-commitment"- | "seal-offline-oracle-package";+ | "seal-offline-oracle-package"+ | "public-materialization-seed"+ | "public-key-digest-oracle";export type SealCommitmentSeverity = "warning" | "error";@@ -46,6 +48,26 @@ export interface SealCommitmentReport {const ONE_WAY_ALGO =/^(?:sha-?256|sha-?384|sha-?512|sha-?3(?:-?(?:256|384|512))?|hmac(?:-?sha-?(?:256|512))?|blake2?b?(?:-?\d+)?|argon2id?|scrypt|pbkdf2)$/i;+const PUBLIC_SEED_FIELDS = [+ "seed",+ "materializationSeed",+ "materialization_seed",+ "hardenSeed",+ "harden_seed",+ "scheduleSeed",+ "schedule_seed",+] as const;++const PUBLIC_KEY_DIGEST_FIELDS = [+ "keySha256",+ "key_sha256",+ "keyDigest",+ "key_digest",+ "keyHash",+ "key_hash",+ "licenseKeySha256",+] as const;+const SEAL_NAME =/^(?:seal|license-seal|entitlement-seal|catalog-seal)(?:\.[\w-]+)*\.json$/i;@@ -256,6 +278,35 @@ export function lintSealCommitmentSource();}+ // CrackMe v8 red team: a public materialization/harden seed lets an attacker+ // re-derive seed-scheduled salt/rounds/pad3/entropy pads and strip XOR masks+ // without reversing WASM. Warning (not refuse): the seed alone is not a prize.+ const seedKey = PUBLIC_SEED_FIELDS.find((k) => asString(parsed[k]) !== undefined);+ if (seedKey) {+ findings.push(+ finding(+ "public-materialization-seed",+ "warning",+ "Public seal carries the materialization/harden seed — seed-derived schedule (salt/rounds/pads) becomes known plaintext. Keep the crypto schedule seed private; publish only a non-cryptographic label.",+ `field=${seedKey}`,+ ),+ );+ }++ // A public digest of the secret key is an offline key verifier (accelerates+ // guessing; one-way, so warning). Keep only the prove-solve digest of the FLAG.+ const keyDigestKey = PUBLIC_KEY_DIGEST_FIELDS.find((k) => asString(parsed[k]) !== undefined);+ if (keyDigestKey) {+ findings.push(+ finding(+ "public-key-digest-oracle",+ "warning",+ "Public seal publishes a digest of the secret key — free offline key oracle. Omit it; keep flag/certificate digest for prove-solve.",+ `field=${keyDigestKey}`,+ ),+ );+ }+// Deduplicate by id (keep highest severity).const byId = new Map<SealCommitmentFindingId, SealCommitmentFinding>();for (const f of findings) {diff --git a/tests/seal-commitment-lint.test.ts b/tests/seal-commitment-lint.test.tsindex 7943226..9781755 100644--- a/tests/seal-commitment-lint.test.ts+++ b/tests/seal-commitment-lint.test.ts@@ -50,7 +50,7 @@ describe("seal-commitment lint (red-blue round-2)", () => {const ids = report.findings.map((f) => f.id);expect(ids).toContain("reversible-public-commitment");expect(ids).toContain("seal-offline-oracle-package");- expect(report.findings.every((f) => f.severity === "error" || f.id === "plaintext-seal-sidecar")).toBe(+ expect(report.findings.every((f) => f.severity === "error" || f.id === "plaintext-seal-sidecar" || f.id === "public-materialization-seed")).toBe(true,);expect(report.findings.some((f) => f.severity === "error")).toBe(true);@@ -114,3 +114,34 @@ describe("seal-commitment lint (red-blue round-2)", () => {expect(report.findings.some((f) => f.id === "reversible-public-commitment")).toBe(true);});});++describe("seal-commitment public seed / key-digest exposure (CrackMe v8 red)", () => {+ it("warns on public materialization seed and keySha256 without refusing", () => {+ const r = lintSealCommitmentSource(+ JSON.stringify({+ schema: "bla-crackme-v8-seal/v1",+ seed: "bla-crackme-v8-aegis-2026-11",+ keySha256: "2b91c07f1035e2ae45a85916af9df33e14da9c8e2e71b8a0a7f2b6f6b00e349e",+ flagSha256: "df777780af5a9e99813bf3b8dafc223c65876c220cf847afa95164f10f026a74",+ }),+ { path: "SEAL.json" },+ );+ const ids = r.findings.map((f) => f.id);+ expect(ids).toContain("public-materialization-seed");+ expect(ids).toContain("public-key-digest-oracle");+ expect(r.shouldRefuseBankrupt).toBe(false);+ });++ it("flag-only prove-solve seal has no seed/key-digest findings", () => {+ const r = lintSealCommitmentSource(+ JSON.stringify({+ schema: "bla-crackme-v8-seal/v2",+ flagSha256: "df777780af5a9e99813bf3b8dafc223c65876c220cf847afa95164f10f026a74",+ }),+ { path: "SEAL.json" },+ );+ const ids = r.findings.map((f) => f.id);+ expect(ids).not.toContain("public-materialization-seed");+ expect(ids).not.toContain("public-key-digest-oracle");+ });+});