Skip to main content
Enterprise Feature — The audit trail requires an Enterprise license. Free and Pro tiers do not log audit events.
CostHQ Enterprise provides an append-only, tamper-evident audit log of all cost-sensitive operations. This ensures that every AI usage event, session lifecycle change, policy update, or data deletion is tracked and verifiable, making CostHQ suitable for SOC2-compliant environments.

Checksum Chain Integrity

To prevent tampering, CostHQ uses a chained SHA-256 checksum architecture. Each event’s checksum is generated by hashing the payload together with the checksum of the previous event:
This creates an unbroken cryptographic chain starting from a genesis hash (00...00). If a single record is inserted, modified, or deleted, every subsequent checksum in the chain will be invalidated, making tampering mathematically impossible to hide.

Team Identity

In a multi-user or automated environment, audit logs are most useful when events are tagged with specific identities. You can configure a machine’s team identity so that all subsequent audit events are tagged with that user/role.

Setting Identity

Once set, all audit events will include this identity alongside the standard machine info (hostname, OS user).

Managing Identity

Viewing the Audit Log

You can view the audit log directly from the CLI or via the Command Center dashboard.

Event Types

The following events are logged:

Verifying Integrity

You can mathematically prove the integrity of the local audit log at any time:
This command walks the entire database, recalculates every checksum in the chain, and confirms whether the log is fully intact or if tampering has occurred.
If tampering is detected, it will report the exact ID where the chain is broken.

SOC2-Compliant Export

For compliance audits, you can export the audit trail in a structured, SOC2-friendly JSON format that includes the chain verification status.
The SOC2 export format looks like this:
You can also export to standard json or csv formats: