forked from Azure/azure-policy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpattern-count-operator.json
40 lines (40 loc) · 1.59 KB
/
pattern-count-operator.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"properties": {
"mode": "all",
"displayName": "Audit Network Security Groups for RDP",
"description": "This policy audits NSGs with RDP ports enabled",
"policyRule": {
"if": {
"allOf": [{
"field": "type",
"equals": "Microsoft.Network/networkSecurityGroups"
},
{
"count": {
"field": "Microsoft.Network/networkSecurityGroups/securityRules[*]",
"where": {
"allOf": [{
"field": "Microsoft.Network/networkSecurityGroups/securityRules[*].direction",
"equals": "Inbound"
},
{
"field": "Microsoft.Network/networkSecurityGroups/securityRules[*].access",
"equals": "Allow"
},
{
"field": "Microsoft.Network/networkSecurityGroups/securityRules[*].destinationPortRange",
"equals": "3389"
}
]
}
},
"greater": 0
}
]
},
"then": {
"effect": "audit"
}
}
}
}