Fix AWS ECR Container Scanning Findings detections returning zero results - #4186
Open
vishwakt wants to merge 1 commit into
Open
Fix AWS ECR Container Scanning Findings detections returning zero results#4186vishwakt wants to merge 1 commit into
vishwakt wants to merge 1 commit into
Conversation
…ults The final stats command in all three AWS ECR Container Scanning Findings detections (low/informational/unknown, medium, high) grouped by CIM-aliased fields (signature, dest, user, user_agent, src, vendor_account, vendor_region, vendor_product) that nothing in the search pipeline creates. Since stats BY drops rows where any groupby field is undefined, the detections always returned zero results, even against their own attack data. Extract the raw CloudTrail fields explicitly instead of relying on unavailable field aliases, so the searches are self-contained. Fixes splunk#4169
vishwakt
requested review from
ljstella,
nasbench and
patel-bhavin
as code owners
July 28, 2026 00:01
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 #4169
Problem
All three AWS ECR Container Scanning Findings detections (low/informational/unknown, medium, high) always return zero results, even against their own attack data. The final
statscommand groups bysignature,dest,user,user_agent,src,vendor_account,vendor_region, andvendor_product, but nothing in the search pipeline creates these fields. They only exist if the AWS TA's CIM field aliasing is applied. Sincestats BYdrops any row where a groupby field is undefined, every row is silently dropped.Root cause analysis and the fix were provided by @ratharaksa in #4169. The issue reports the low/informational/unknown detection; the medium and high variants have the identical rename/stats pattern and the same bug, so this PR fixes all three.
Fix
Rename the raw CloudTrail fields explicitly instead of relying on unavailable field aliases:
userIdentity.arnasuseruserAgentasuser_agentsourceIPAddressassrcawsRegionasvendor_regionuserIdentity.accountIdasvendor_accounteventNameassignatureresponseElements.registryIdasdesteval vendor_product="Amazon Web Services"Bumped
versionto 14 and updatedmodification_datein all three detections.Verification
Verified every raw field referenced above exists in the detections' attack data (
aws_ecr_scanning_findings_events.json). Against that data the fixed searches return 85 result rows (low/informational/unknown), 14 (medium), and 2 (high), with no rows dropped for undefined groupby fields. The issue author independently verified the same fix on a live Splunk instance.