Skip to content

feat: add --event-type and --sid filters to audit list#285

Merged
maximelb merged 1 commit into
cli-v2from
feat/audit-list-event-type-sid-filters
May 3, 2026
Merged

feat: add --event-type and --sid filters to audit list#285
maximelb merged 1 commit into
cli-v2from
feat/audit-list-event-type-sid-filters

Conversation

@maximelb
Copy link
Copy Markdown
Contributor

@maximelb maximelb commented May 2, 2026

Summary

  • Expose the event_type and sid server-side filters on audit list. The SDK and API both already accept them, but the CLI didn't pass them through.
  • New flags: --event-type (e.g. hive_set, send_task) and --sid (limit to a specific sensor).

Why

Without server-side filtering, callers have to pull the full audit stream and grep client-side. On a busy org a 7-day window can contain ~5,000 entries dominated by a single extension's traffic — wasteful and noisy for AI agents and humans alike.

Test plan

  • python -m pytest tests/unit -k audit (9 passed)
  • Manual smoke test against the white-sands org

🤖 Generated with Claude Code

The SDK's get_audit_logs() and the API endpoint both accept event_type
and sid filters, but the CLI didn't expose them.  Without server-side
filtering, callers have to pull the full audit stream and grep client-
side, which is expensive on busy orgs (e.g. one weekly window contained
~5,000 entries dominated by a single extension's hive_set traffic).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@maximelb maximelb requested a review from dzimine-lc May 3, 2026 03:36
@maximelb maximelb marked this pull request as ready for review May 3, 2026 03:36
@maximelb maximelb merged commit 6797e88 into cli-v2 May 3, 2026
6 of 7 checks passed
@maximelb maximelb deleted the feat/audit-list-event-type-sid-filters branch May 3, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant