Lightbox is a flight recorder for AI agents that creates tamper-evident logs of tool executions. It provides:
- Append-only logging: Events can only be added, never modified
- Hash chain integrity: Each event includes the hash of the previous
- Offline verification: No network required to verify a session
- Content integrity: Any modification is detectable
- Confidentiality: Event logs are stored in plaintext
- Authentication: No proof of WHO created the log
- Non-repudiation: Without signatures, origin cannot be proven
- Secure storage: Files use standard filesystem permissions
| Threat | Mitigation |
|---|---|
| Accidental corruption | Hash chain detects any bit changes |
| Naive tampering | Hash mismatch immediately detected |
| Event deletion | Chain break detected at deletion point |
| Event insertion | Chain break at insertion point |
| Event reordering | prev_hash mismatches reveal reordering |
| Truncation (crash) | Distinct from tampering via incomplete line detection |
| Threat | Status |
|---|---|
| Malicious operator (full log replacement) | Not addressed - requires external anchoring |
| Selective disclosure attacks | Not addressed - no signatures |
| Timing attacks | Not addressed - timestamps are observational |
| Side-channel attacks | Not addressed |
lightbox verify <session>| Code | Meaning |
|---|---|
| 0 | Valid - hash chain intact |
| 1 | Tampered - content modified or chain broken |
| 2 | Truncated - incomplete write detected (likely crash) |
| 3 | Parse error - invalid JSON |
| 4 | Not found |
- Each event's hash matches its computed hash
- Each event's
prev_hashmatches the previous event's hash - First event has
prev_hash=null - No truncated/incomplete lines (except crash recovery)
- Timestamps are accurate
- Tool outputs are truthful
- Events are complete (no dropped events before recording)
- Log hasn't been entirely replaced
- Per-session signatures: Sign the final hash to prove authorship
- External anchoring: Publish session hashes to immutable stores
- Timestamping: Third-party timestamp services for time proofs
v1 uses SHA-256. This provides:
- 256-bit collision resistance
- Widely supported and audited
- Sufficient for integrity verification
- Protect the
~/.lightboxdirectory with appropriate permissions - Back up sessions to immutable storage for long-term evidence
- Consider external anchoring for high-stakes applications
- Verify sessions immediately upon receipt
- Compare session hashes out-of-band when possible
- Check for truncation warnings (may indicate interrupted writes)
- Don't store secrets in tool inputs/outputs - use redaction
- Consider size limits for large payloads
- Use the
content_hashesfield when redacting for verifiability
For security issues, please email security@uselightbox.app rather than opening a public issue.