New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@undisk-mcp/audit-verifier

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@undisk-mcp/audit-verifier

Standalone audit chain verifier for Undisk MCP — verify hash-chain integrity of audit exports offline

latest
npmnpm
Version
0.54.1
Version published
Maintainers
1
Created
Source

@undisk-mcp/audit-verifier

Standalone hash-chain verifier for Undisk MCP audit trails. Supports v1/v2/v3 hash formulas. Zero dependencies for offline compliance verification.

Installation

npm install @undisk-mcp/audit-verifier

CLI Usage

# Verify an exported audit trail
npx @undisk-mcp/audit-verifier export.ndjson

# Machine-readable output for CI pipelines
npx @undisk-mcp/audit-verifier export.ndjson --ci

# Output result as JSON
npx @undisk-mcp/audit-verifier export.ndjson --json

# Generate a self-contained HTML report
npx @undisk-mcp/audit-verifier export.ndjson --report audit-report.html

# Show audit summary statistics
npx @undisk-mcp/audit-verifier export.ndjson --summary

# Verbose per-entry progress
npx @undisk-mcp/audit-verifier export.ndjson --verbose

# Combine flags
npx @undisk-mcp/audit-verifier export.ndjson --ci --report audit-report.html

Options

FlagDescription
--ciMachine-readable output. Exit 0 if valid, exit 1 if broken. Minimal stdout.
--jsonOutput the full verification result as JSON to stdout.
--report <path>Generate a self-contained HTML report at the given path.
--summaryShow a summary table (entry count, time range, agents, operations).
--verbose, -vShow per-entry verification progress.
-h, --helpShow help message.

Exit Codes

CodeMeaning
0Chain is valid (or no entries)
1Chain is broken or an error occurred

CI Integration

The --ci flag is designed for use in automated pipelines. It produces minimal output and relies on exit codes for pass/fail signaling.

GitHub Actions

- name: Verify audit trail
  run: npx @undisk-mcp/audit-verifier audit-export.ndjson --ci --report audit-report.html

- name: Upload report
  uses: actions/upload-artifact@v4
  with:
    name: audit-report
    path: audit-report.html

Programmatic Usage

import {
  parseAuditExport,
  verifyAuditChain,
  summarizeAudit,
  generateHtmlReport,
} from "@undisk-mcp/audit-verifier";

const content = fs.readFileSync("export.ndjson", "utf-8");
const entries = parseAuditExport(content);
const result = await verifyAuditChain(entries);

if (result.valid) {
  console.log(`Verified ${result.checked} entries`);
} else {
  console.error(`Chain broken at seq ${result.brokenAt}: ${result.error}`);
}

// Generate summary statistics
const summary = summarizeAudit(entries);
console.log(`${summary.totalEntries} entries, ${summary.uniqueAgents.length} agents`);

// Generate HTML report
const html = generateHtmlReport(entries, result);
fs.writeFileSync("report.html", html);

Documentation

See mcp.undisk.app for full documentation.

License

MIT

Keywords

undisk

FAQs

Package last updated on 21 May 2026

Related posts