Skip to content

Fix AWS ECR Container Scanning Findings detections returning zero results - #4186

Open
vishwakt wants to merge 1 commit into
splunk:developfrom
vishwakt:fix_aws_ecr_scanning_findings_cim_fields
Open

Fix AWS ECR Container Scanning Findings detections returning zero results#4186
vishwakt wants to merge 1 commit into
splunk:developfrom
vishwakt:fix_aws_ecr_scanning_findings_cim_fields

Conversation

@vishwakt

Copy link
Copy Markdown

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 stats command groups by signature, dest, user, user_agent, src, vendor_account, vendor_region, and vendor_product, but nothing in the search pipeline creates these fields. They only exist if the AWS TA's CIM field aliasing is applied. Since stats BY drops 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.arn as user
  • userAgent as user_agent
  • sourceIPAddress as src
  • awsRegion as vendor_region
  • userIdentity.accountId as vendor_account
  • eventName as signature
  • responseElements.registryId as dest
  • eval vendor_product="Amazon Web Services"

Bumped version to 14 and updated modification_date in 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.

…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
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.

[BUG] AWS ECR Container Scanning Findings Low Informational Unknown always returns zero results

2 participants