BED-6542: Only Collect Management Groups from Current Tenant#185
BED-6542: Only Collect Management Groups from Current Tenant#185StranDutton wants to merge 2 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Ticket: BED-6542
Problem: AZContains edges are wrongly created across AZTenant environments, connecting AZManagementGroups of one AZTenant to AZSubscriptions of another AZTenant.
This PR filters out foreign-tenant
AZManagementGroupscollection.When AzureHound collects from an account with cross-tenant visibility (like through Azure Lighthouse), the ARM API returns management groups from all accessible tenants. Without AzureHound filtering by tenant, management groups with the same name across tenants produce identical objectId paths, collapsing into a single node in BHE and creating false AZContains edges between tenants. This compares each management group's tenantId against the authenticated tenant and skips any that don't match.
Summary by CodeRabbit
Bug Fixes
Tests