Skip to content

feat: add audit log and history operation#27

Merged
arein merged 1 commit into
mainfrom
feat/audit-log
Mar 4, 2026
Merged

feat: add audit log and history operation#27
arein merged 1 commit into
mainfrom
feat/audit-log

Conversation

@arein
Copy link
Copy Markdown
Contributor

@arein arein commented Mar 4, 2026

Summary

  • Adds an append-only JSONL audit log (~/.config/wallet/audit.log) that captures every companion wallet operation with input/output details
  • Sensitive fields (mnemonic, signatures, signed transactions) are automatically redacted before writing
  • New history CLI operation queries the log with filters (--operation, --chain, --account, --last, --since)
  • Audit log uses 0o600/0o700 permissions matching the existing keystore security model

Test plan

  • npm run build — compiles cleanly
  • npm run test — all 90 tests pass (8 new audit unit tests + 5 new CLI integration tests)
  • npm run lint — no lint errors
  • Manual smoke test: companion-wallet info, then companion-wallet history shows the info call logged

🤖 Generated with Claude Code

Append-only JSONL audit log captures every wallet operation with full
input/output details. Sensitive fields (mnemonic, signatures, signed
transactions) are redacted before writing. A new `history` CLI operation
queries the log with filters (--operation, --chain, --account, --last,
--since).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arein arein merged commit b596c82 into main Mar 4, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant