verify_log
Verify that the hash-chained audit log has not been tampered with by walking every entry and confirming each hash links to the previous. Use to prove compliance, after manual edits, or as a periodic trust check.
Instructions
Verify that the local hash-chained audit log has not been tampered with, by walking every entry and confirming each one's hash correctly chains to the previous entry (equivalent to auditreach verify-log --json). Call this to prove compliance/audit integrity before sharing the log with a third party, after any manual edit to the log file, or periodically as a trust check -- it does not need to run before every search. This tool is fully read-only: it opens and reads the log file but never writes to it, is idempotent, and produces the same verdict on repeated calls against an unchanged file. Prerequisite: an audit log file must already exist (one is created automatically the first time search succeeds); pointing this at a path with no log file returns a structured failure rather than raising. Parameters: path (optional string; defaults to ./auditreach.log.jsonl in the current working directory if omitted). Example calls: {} (verify the default log); {"path": "./auditreach.log.jsonl"}. Returns a JSON object with success (bool, true only if the entire chain verifies intact) and exitCode (int); on failure error describes the problem, such as a broken hash link at a specific entry index or a missing/unreadable log file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |