๐ก๏ธ 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(ui): add formatOneClickDefenseReport CLI output formatter
qybaihe426666eec297
diff --git a/src/ui/reporter.ts b/src/ui/reporter.tsindex 6da9cbf..c70e3d4 100644--- a/src/ui/reporter.ts+++ b/src/ui/reporter.ts@@ -7,6 +7,7 @@ import type {} from "../core/types.js";import type { DoctorDiagnosticReport } from "../setup/doctor.js";import type { SetupRunResult } from "../setup/setup.js";+import type { OneClickDefenseReport } from "../engine/defender.js";const ANSI = {reset: "\x1b[0m",@@ -224,3 +225,48 @@ export function formatSetupReport(res: SetupRunResult): string {return lines.join("\n");}++export function formatOneClickDefenseReport(rep: OneClickDefenseReport): string {+ const lines: string[] = [+ formatBanner(),+ "",+ `${ANSI.bold}${ANSI.blue}โก BLA One-Click Counter-REA Defense Hardening Complete!${ANSI.reset}`,+ "",+ ` ${ANSI.bold}Input Target:${ANSI.reset} ${rep.inputPath}`,+ ` ${ANSI.bold}Hardened Output:${ANSI.reset} ${ANSI.cyan}${rep.outputPath}${ANSI.reset}`,+ ` ${ANSI.bold}Intensity Preset:${ANSI.reset} ${ANSI.magenta}${rep.intensity.toUpperCase()}${ANSI.reset} (Defense Score: ${ANSI.green}${ANSI.bold}${rep.verification.defenseScore}/100${ANSI.reset})`,+ "",+ `${ANSI.bold}${ANSI.blue}โโ 5-Stage Automated Counter-REA Pipeline โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ${ANSI.reset}`,+ ];++ for (const st of rep.stages) {+ const badge =+ st.status === "passed"+ ? `${ANSI.green}โ PASS${ANSI.reset}`+ : `${ANSI.yellow}! WARN${ANSI.reset}`;+ lines.push(` [${badge}] ${ANSI.bold}${st.stage}${ANSI.reset}: ${st.headline}`);+ }++ lines.push(+ "",+ `${ANSI.bold}${ANSI.yellow}โโ Resource Exhaustion (่ๅฐฝๅฏนๆน็ฎๅไธ้ข็ฎ) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ${ANSI.reset}`,+ ` โข REA Budgets Tripped: ${ANSI.green}${rep.exhaustionSummary.reaBudgetsTripped.join(", ") || "binary-container-limits"}${ANSI.reset}`,+ ` โข Obligation Ledger Expansion:${rep.exhaustionSummary.obligationLedgerNodesBefore} nodes --> ${ANSI.bold}${rep.exhaustionSummary.obligationLedgerNodesAfter} nodes (${rep.verification.obligationGraphExpansionFactor}x)${ANSI.reset}`,+ ` โข Token Bankruptcy Factor: ${ANSI.yellow}${ANSI.bold}${rep.exhaustionSummary.tokenAmplificationFactor}x${ANSI.reset} (Attacker API Bill: ${ANSI.yellow}${ANSI.bold}~$${rep.exhaustionSummary.attackerEstimatedBillUsd.toFixed(2)}${ANSI.reset})`,+ "",+ `${ANSI.bold}${ANSI.cyan}โโ Model Misjudgment Induction (่ฏฑๅฏผๅคงๆจกๅ่ฏฏๅค) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ${ANSI.reset}`,+ ` โข Shadow Logic & Honeypots: ${ANSI.bold}${rep.deceptionSummary.decoyFunctionsInjected}${ANSI.reset} high-salience bait & shadow procedures`,+ ` โข Tarjan SCC Labyrinth XRefs: ${ANSI.bold}${rep.deceptionSummary.fakeCrossReferencesCreated}${ANSI.reset} mutually-recursive call-graph edges`,+ ` โข Evidence Contract Lures: ${ANSI.bold}${rep.deceptionSummary.chaffAndEvidenceLuresEmbedded}${ANSI.reset} competing-explanation & enclave manifests`,+ ` โข Decoy IPC & gRPC Routes: ${ANSI.bold}${rep.deceptionSummary.ipcAmbiguityAndObligationSites}${ANSI.reset} obligation/IPC sites + ${ANSI.bold}${rep.deceptionSummary.decoyRoutesAndGrpcMethods}${ANSI.reset} mirage routes`,+ );++ if (rep.manifestPath) {+ lines.push(+ "",+ ` ${ANSI.bold}Signed Manifest:${ANSI.reset} ${ANSI.green}${rep.manifestPath}${ANSI.reset}`,+ );+ }++ return lines.join("\n");+}