Skip to main content
Glama
arian-gogani

Nobulex MCP Compliance Server

by arian-gogani

verify_log

Verify the integrity of hash-chained audit logs to detect tampering in the Nobulex MCP Compliance Server.

Instructions

Independently verify the integrity of the hash-chained audit log. Detects any tampering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:99-114 (registration)
    The verify_log tool is registered in src/index.ts. The handler calls auditLog.verify().
    server.tool(
      "verify_log",
      "Independently verify the integrity of the hash-chained audit log. Detects any tampering.",
      {},
      async () => {
        const result = auditLog.verify();
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      }
    );
  • The implementation of verify() which performs the integrity check on the audit log.
    verify(): { valid: boolean; entries: number; error?: string } {
      if (this.entries.length === 0) {
        return { valid: true, entries: 0 };
      }
    
      for (let i = 0; i < this.entries.length; i++) {
        const entry = this.entries[i];
    
        // Check previousHash linkage
        const expectedPrev =
          i === 0 ? GENESIS_HASH : this.entries[i - 1].hash;
        if (entry.previousHash !== expectedPrev) {
          return {
            valid: false,
            entries: this.entries.length,
            error: `Entry ${i}: previousHash mismatch.`,
          };
        }
    
        // Recompute hash
        const { hash, ...rest } = entry;
        const recomputed = computeHash(rest);
        if (recomputed !== hash) {
          return {
            valid: false,
            entries: this.entries.length,
            error: `Entry ${i}: hash mismatch (tampering detected).`,
          };
        }
      }
    
      return { valid: true, entries: this.entries.length };
    }
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/arian-gogani/nobulex-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server