Skip to content

ioc search: add --info locations, --limit, --case-sensitive, --wildcards flags#313

Merged
maximelb merged 1 commit into
masterfrom
ioc-search-locations
Jul 17, 2026
Merged

ioc search: add --info locations, --limit, --case-sensitive, --wildcards flags#313
maximelb merged 1 commit into
masterfrom
ioc-search-locations

Conversation

@maximelb

Copy link
Copy Markdown
Contributor

Problem

limacharlie ioc search --type ip --value <IP> only ever returns prevalence counts — there is no way to see which sensors observed the IOC. A user reported this in support.

The whole stack below the CLI already supports it: the SDK's search_ioc() accepts info="locations" (plus limit, case_sensitive, wildcards), the API gateway routes info=locations to the get_obj_locations RPC, and the backend returns per-SID entries with first/last seen and hostnames. The CLI search command just never exposed the flags (batch-search in the same file already has --info/--limit).

Change

  • ioc search gains --info summary|locations (default summary, unchanged behavior), --limit, --case-sensitive/--case-insensitive and --wildcards, passed straight through to Insight.search_ioc().
  • Updated the --ai-help explain text with the new flags and examples.
  • Added an integration test covering --info locations --limit.

Verification

  • tests/unit/test_sdk_insight.py (18 tests) passes; the full unit suite shows the same 111 pre-existing failures as master (unrelated test_search_* files).
  • ioc search --help renders the new options correctly.
  • Integration tests require org creds and will run in CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_01F2QkWSTn8PEgyKvs7epe7f

…dcards

The single-IOC 'ioc search' command always called the API with the
default info=summary, so users could only ever see prevalence counts
with no way to get the sensor IDs that observed the IOC. The SDK
(search_ioc), API gateway and backend all already support
info=locations; only the CLI flags were missing. batch-search already
exposed --info/--limit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F2QkWSTn8PEgyKvs7epe7f
@maximelb
maximelb requested a review from a team July 17, 2026 14:17
@maximelb
maximelb merged commit 67c28d6 into master Jul 17, 2026
7 checks passed
@maximelb
maximelb deleted the ioc-search-locations branch July 17, 2026 14:17
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.

2 participants