azure-vm-write-config
match (effective permission)
{
"action": "Microsoft.Compute/virtualMachines/write",
"scope_type": "resource|resourceGroup|subscription"
}
emit
| source type | Identity |
|---|---|
| target type | * |
| source | <principal> |
| target | <virtualMachine> |
| permissions | Microsoft.Compute/virtualMachines/write |
Narrative
{principal.name} can rewrite the configuration of {target.name} (virtualMachines/write) including customData and the identity binding.
Raw rule rules/derived/azure/vm.yaml
id: azure-vm-write-config
emits: CanModifyConfiguration
match_effective_permission:
action: Microsoft.Compute/virtualMachines/write
scope_type: resource|resourceGroup|subscription
emit:
source_type: Identity
target_type: '*'
source: <principal>
target: <virtualMachine>
permissions:
- Microsoft.Compute/virtualMachines/write
note: Can set osProfile.customData/cloud-init or change the identity block; realizes execution at next
(re)deploy/boot.
narrative: '{principal.name} can rewrite the configuration of {target.name} (virtualMachines/write)
including customData and the identity binding.'