azure-mg-contains-child-mg

explicit azure emits Contains

match (record)

{ "field": "properties.children[].type == Microsoft.Management/managementGroups", "resource_type": "Microsoft.Management/managementGroups" }

emit

source typeAdministrativeBoundary
target type*
source<parent management group node>
target<child management group node>

Narrative

{parent.name} contains child management group {child.name}.

Raw rule rules/explicit/azure-mgmtgroups.yaml

id: azure-mg-contains-child-mg
emits: Contains
applies_to:
- azure
match_record:
  resource_type: Microsoft.Management/managementGroups
  field: properties.children[].type == Microsoft.Management/managementGroups
emit:
  source_type: AdministrativeBoundary
  target_type: '*'
  source: <parent management group node>
  target: <child management group node>
  api_source: Microsoft.Management/managementGroups GET ?$expand=children&$recurse=true | getEntities
  evidence_field: properties.children[].id
  narrative: '{parent.name} contains child management group {child.name}.'
move · open · esc close