MEDIUM
Source
Trivy
ID
AVD-AZU-0071

App Service FTPS Enforce Disabled

Allowing plain FTP risks credentials and data being transmitted unencrypted.

Impact

Follow the appropriate remediation steps below to resolve the issue.

Set FTPS state to ‘FTPS Only’ in App Service settings to prevent plaintext FTP.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
resource "azurerm_app_service" "good_example" {
  name                = "example-app-service"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  app_service_plan_id = azurerm_app_service_plan.example.id

  site_config {
    ftps_state = "FtpsOnly"
  }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
resource "azurerm_app_service" "good_example_disabled" {
  name                = "example-app-service"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  app_service_plan_id = azurerm_app_service_plan.example.id

  site_config {
    ftps_state = "Disabled"
  }
}