fix(secops): surface all indicator fields and metadata in get_ioc_matches - #297
Open
dandye wants to merge 1 commit into
Open
fix(secops): surface all indicator fields and metadata in get_ioc_matches#297dandye wants to merge 1 commit into
dandye wants to merge 1 commit into
Conversation
…ches - Extract all key/value pairs from artifactIndicator (e.g. domain, url, ip, hash) - Support both camelCase and snake_case API response formats - Surface First Seen, Last Seen, Category, Severity, Confidence, and Associated Entity - Add unit tests for multi-indicator formatting and snake_case compatibility Fixes #264
dandye
force-pushed
the
fix/issue-264-ioc-matches
branch
from
August 30, 2026 02:42
077b983 to
525310a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #264
Summary
Fixes the output formatting in
get_ioc_matches(server/secops/secops_mcp/tools/ioc_matches.py) to ensure all IoC indicators and critical threat intelligence metadata fields are surfaced rather than dropped.Root Cause
Previously,
get_ioc_matchesonly extracted a single indicator field fromartifactIndicatorusing a hardcoded['domain', 'url', 'ip', 'hash']loop break on the first match. If an IoC object contained multiple indicator dimensions or non-standard indicator keys (such ashash_sha256,hostname, or snake_case attributes from SDK objects), subsequent indicators were omitted. In addition, metadata fields such asfirstSeenTime,lastSeenTime,category,severity,confidence, andassociatedEntitywere ignored.Solution
artifactIndicator(orartifact_indicator), producing a clean formatted string of all indicators (e.g.domain=bad-domain.com, url=https://bad-domain.com/malware.exe).First Seen,Last Seen,Category,Severity,Confidence, andAssociated Entity.firstSeenTime,iocCategory, etc.) and Python SDK model shapes (first_seen_time,ioc_category, etc.).server/secops/tests/test_secops_tools_unit.pycovering multi-indicator formatting, snake_case normalization, and empty match handling.Testing
pytest server/secops/tests/test_secops_tools_unit.py(14 passed)