Skip to content

feat(audit): read-only sshx audit query/export consumption surface #54

Description

@jamiesun

Background

Audit JSONL is written by default under ~/.sshx/audit, but there is no consumption surface — governance loops (human review, agent self-inspection, incident reconstruction) currently require hand-rolled jq.

Plan

  • sshx audit query: read-only filters — --since/--until, --target, --action, --run-id, --error-kind, --bypass-only; outputs table for humans, --json/JSONL for agents.
  • sshx audit export: bounded export of matching events to a file (JSONL), for handoff to SIEM-adjacent tooling — sshx itself stays not-a-SIEM per the non-goals.
  • Strictly read-only: no retention management, no rotation, no upload.

Acceptance

  • Query filters compose; empty result is exit 0 with empty array in JSON mode
  • E2E: execute → query by run_id → assert the audit trail fields
  • Docs page under docs/ + usage help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions