Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
shabaz-github authored May 27, 2024
1 parent e388ccf commit cae4a43
Showing 1 changed file with 139 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"properties": {
"displayName": "Azure WAF Should Have Log Scrubbing Rules Enabled",
"policyType": "Custom",
"mode": "All",
"description": "Ensure that log scrubbing rules are enabled on the Azure WAF to remove sensitive data from your WAF logs. This policy will check if at least 1 rule is configured.",
"metadata": {
"version": "1.0.0",
"category": "Network"
},
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"anyOf": [
{
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies"
},
{
"field": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/policySettings.logScrubbing.state",
"equals": "Enabled"
},
{
"count": {
"field": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/policySettings.logScrubbing.scrubbingRules[*]",
"where": {
"field": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/policySettings.logScrubbing.scrubbingRules[*].state",
"equals": "Enabled"
}
},
"equals": 0
}
]
},
{
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies"
},
{
"field": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/policySettings.logScrubbing.state",
"equals": "Disabled"
}
]
},
{
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies"
},
{
"field": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/policySettings.logScrubbing",
"exists": "false"
}
]
},
{
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies"
},
{
"field": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies/policySettings.logScrubbing.state",
"equals": "Enabled"
},
{
"count": {
"field": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies/policySettings.logScrubbing.scrubbingRules[*]",
"where": {
"field": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies/policySettings.logScrubbing.scrubbingRules[*].state",
"equals": "Enabled"
}
},
"equals": 0
}
]
},
{
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies"
},
{
"field": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies/policySettings.logScrubbing.state",
"equals": "Disabled"
}
]
},
{
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies"
},
{
"field": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies/policySettings.logScrubbing",
"equals": "null"
}
]
},
{
"allOf": [
{
"field": "type",
"equals": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies"
},
{
"field": "Microsoft.Network/frontdoorWebApplicationFirewallPolicies/policySettings.logScrubbing",
"exists": "false"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}
}
}

0 comments on commit cae4a43

Please sign in to comment.