Azure App Service web apps with public network access
Description
Azure Web Apps are a fully managed platform for building, deploying, and scaling web apps. They can be configured to allow public access over the internet or restricted access through Virtual Networks and VPNs. This policy checks whether public network access to Azure Web Apps is disabled.
Code Example
terraform
resource "azurerm_linux_web_app" "example" {
name = "example-app"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
# ... other configurations ...
+ public_network_access_enabled = false
}
resource "azurerm_windows_web_app" "example" {
name = "example-app"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
# ... other configurations ...
+ public_network_access_enabled = false
}Remediation
Terraform
Resource:
- azurerm_linux_web_app
- azurerm_windows_web_app
Arguments:
- public_network_access_enabled
Rule Details
| Field | Value |
|---|---|
| ID | IAC-0729 |
| Severity | MEDIUM |
| IaC Type | arm |
| Frameworks | Terraform, |
| Checkov ID | CKV_AZURE_222 |