Skip to content

🐛 Fix Macie custom data identifier detail fetch using wrong region#6922

Merged
tas50 merged 1 commit intomainfrom
tsmith/fix-macie-region
Mar 16, 2026
Merged

🐛 Fix Macie custom data identifier detail fetch using wrong region#6922
tas50 merged 1 commit intomainfrom
tsmith/fix-macie-region

Conversation

@tas50
Copy link
Copy Markdown
Member

@tas50 tas50 commented Mar 16, 2026

Summary

  • Bug: populateIdentifierDetails hardcoded us-east-1 when calling GetCustomDataIdentifier, but custom data identifiers are listed per-region via getCustomDataIdentifiers. If an identifier was created in a different region (e.g., eu-west-1), the detail fetch would fail or return wrong data.
  • Fix: Added cacheRegion field to mqlAwsMacieCustomDataIdentifierInternal, populated it during listing, and used it in populateIdentifierDetails instead of the hardcoded region.

Test plan

  • Deploy to an AWS account with Macie enabled in multiple regions
  • Create custom data identifiers in a non-us-east-1 region
  • Run mql run aws -c "aws.macie.customDataIdentifiers { id description regex keywords tags }" and verify detail fields are populated correctly for identifiers in all regions

🤖 Generated with Claude Code

populateIdentifierDetails hardcoded us-east-1 when calling
GetCustomDataIdentifier, but identifiers are listed per-region.
Cache the region from the listing context and use it for detail fetches.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@mondoo-code-review mondoo-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes Macie custom data identifier detail fetching failing in non-us-east-1 regions.

@tas50 tas50 changed the title Fix Macie custom data identifier detail fetch using wrong region 🐛 Fix Macie custom data identifier detail fetch using wrong region Mar 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

5 452 tests   5 448 ✅  1m 59s ⏱️
  412 suites      4 💤
   31 files        0 ❌

Results for commit dacd8b7.

@tas50 tas50 merged commit 3091d3d into main Mar 16, 2026
22 checks passed
@tas50 tas50 deleted the tsmith/fix-macie-region branch March 16, 2026 05:37
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant