INNER CODE UNIT · JavaScript

exportReport

asklokesh/loki-mode · src/audit/index.js:81

function exportReport(type, opts) {
  var report = generateReport(type, opts);
  return compliance.exportReportJson(report);
}

/**
 * Generate a compliance report as a plain object, with the agent-chain
 * tamper-evidence verdict folded in.
 *
 * This is the object form intended for surfaces (e.g. the dashboard
 * /api/compliance endpoint) that need the report as data rather than a
 * pre-serialized string. It always reflects the REAL audit chain:
 *
 *   - The report body is generated from the live audit entries
 *     (`_log.readEntries()`), never fabricated.
 *   - `chainIntegrity` is populated from `verifyChain()` so the report
 *     carries the true tamper-evidence state of the underlying chain.
 *     For the SOC2 report this fills the `chainIntegrity: null` slot the

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…