Fix: domain/url enrichment KeyError on case-mismatched indicator values#44332
Conversation
🤖 AI-Powered Code Review AvailableYou can leverage AI-powered code review to assist with this PR! Available Commands:
|
Coverage Report
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
🤖 Analysis started. Please wait for results... |
🤖 AI Review DisclaimerThis review was generated by an AI-powered tool and may contain inaccuracies. Please be advised, and we extend our sincere apologies for any inconvenience this may cause. |
marketplace-ai-reviewer
left a comment
There was a problem hiding this comment.
Hi! Thanks for your contribution. I've reviewed the changes and have a few minor adjustments regarding metadata and release notes.
Please ensure the keywords lists in the pack metadata files include a vendor name (e.g., 'Cortex' or 'XSOAR'), and add a mandatory category to the ApiModules pack. Also, since there are no functional changes in AggregatedScripts, the release notes should be simplified to the standard metadata template.
Thanks again for your work on this!
Additionally, please address the following file-level notes:
Packs/AggregatedScripts/pack_metadata.json: Thekeywordslist is empty. Please add the vendor name (e.g., 'Cortex' or 'XSOAR') to thekeywordslist.Packs/ApiModules/pack_metadata.json: - Thecategorieslist is empty. Please ensure this mandatory key is populated with at least one category.- The
keywordslist is empty. Please add the vendor name (e.g., 'Cortex' or 'XSOAR') to thekeywordslist. Packs/AggregatedScripts/ReleaseNotes/1_3_40.md: Since there are no functional code changes in theAggregatedScriptspack (only a version bump), the release notes should be at the pack level and use the standard metadata template. Please replace the entire contents of this file with the following:
## Aggregated Scripts
- Documentation and metadata improvements.@JudahSchwartz, @almog2296 please review and approve the results generated by the AI Reviewer by responding 👍 on this comment.
This comment has been minimized.
This comment has been minimized.
This PR was automatically updated by a GitHub Action
To stop automatic version bumps, add the |
This comment has been minimized.
This comment has been minimized.
…ntent into enrichment-bug-fix-XSUP-69120
This PR was automatically updated by a GitHub Action
To stop automatic version bumps, add the |
This comment has been minimized.
This comment has been minimized.
This PR was automatically updated by a GitHub Action
To stop automatic version bumps, add the |
This comment has been minimized.
This comment has been minimized.
|
Requesting Force Merge for this PR. Only the IPEnrichment TPB is failing. The failure is caused by a known issue in our build tenants, where an IP address can sometimes be extracted by The PR itself changes only a small part of the module. All other TPBs are passing successfully, and the updated command was tested manually on a working tenant (the TPB also passed succesfully). This PR also updates the IPEnrichment TPB to replace the usage of CrowdStrike Falcon, so future CrowdStrike-related PRs will not fail on this TPB unnecessarily. |
…ntent into enrichment-bug-fix-XSUP-69120
This comment has been minimized.
This comment has been minimized.
This PR was automatically updated by a GitHub Action
To stop automatic version bumps, add the |
This comment has been minimized.
This comment has been minimized.
…ntent into enrichment-bug-fix-XSUP-69120
|
Validate summary Verdict: PR can be force merged from validate perspective? ✅ |
🔍 AI Triage Report AvailableAn automated triage report has been generated for this pipeline. Status: 📋 Triage Report
|
|
Requesting Force Merge for this PR. Only the IPEnrichment TPB is failing. The failure is caused by a known issue in our build tenants, where an IP address can sometimes be extracted by !extractIndicators as both Domain and IP. This causes the ip-enrichment script to treat the input as invalid. The PR itself changes only a small part of the module. All other TPBs are passing successfully, and the updated command was tested manually on a working tenant (the TPB also passed succesfully). This PR also updates the IPEnrichment TPB to replace the usage of CrowdStrike Falcon, so future CrowdStrike-related PRs will not fail on this TPB unnecessarily. |
…es (#44332) * fixes * fixes * fixes * Bump pack from version AggregatedScripts to 1.3.41. * fixes * fixes * Bump pack from version ApiModules to 2.4.18. * fixes * fixes * Bump pack from version AggregatedScripts to 1.3.42. * fixes * Bump pack from version ApiModules to 2.4.19. * Bump pack from version ApiModules to 2.4.20. * fixes * Trigger GitHub pipeline (user-created PR) * Trigger GitHub pipeline (user-created PR) * Trigger GitHub pipeline (user-created PR) * Bump pack from version ApiModules to 2.4.21. * Trigger GitHub pipeline (user-created PR) --------- Co-authored-by: Content Bot <bot@demisto.com> Co-authored-by: CI Bot <ci@demisto.com>
…es (#44332) * fixes * fixes * fixes * Bump pack from version AggregatedScripts to 1.3.41. * fixes * fixes * Bump pack from version ApiModules to 2.4.18. * fixes * fixes * Bump pack from version AggregatedScripts to 1.3.42. * fixes * Bump pack from version ApiModules to 2.4.19. * Bump pack from version ApiModules to 2.4.20. * fixes * Trigger GitHub pipeline (user-created PR) * Trigger GitHub pipeline (user-created PR) * Trigger GitHub pipeline (user-created PR) * Bump pack from version ApiModules to 2.4.21. * Trigger GitHub pipeline (user-created PR) --------- Co-authored-by: Content Bot <bot@demisto.com> Co-authored-by: CI Bot <ci@demisto.com>
Related Issues
fixes: XSUP-69120
Description
Aggregated enrichment commands, such as !domain-enrichment and !url-enrichment, raised a KeyError when the input casing did not match the casing of the indicator stored in TIM.
For example, an indicator created as Test1.com could later be queried as test1.com or tesT1.com. TIM returns the existing indicator using its original casing, but the aggregation logic tried to map it back using the exact input casing, causing the lookup to fail.
Root Cause
The input-to-indicator mapping in AggregatedCommandApiModule was case-sensitive and supported only a single value per normalized key.
Fix
Updated the mapping to be case-insensitive and multi-valued:
dict[str, list[IndicatorInstance]]
This ensures all case variants of the same indicator receive the correct TIM enrichment result.
Additional fixes in this PR: