Ensure web sockets are disabled for Azure App Service

MEDIUM

Description

Using Web Sockets for Azure App Service may introduce unknown vulnerabilities.

Remediation

In Azure Console -

  1. Open the Azure Portal and go to App Services.
  2. Select the App service you wish to edit.
  3. Select Configuration under Settings, then the General settings tab.
  4. Under Platform Settings, set Web sockets to off.
  5. Save.

In Terraform -

  1. In the azurerm_app_service resource, set websockets_enabled to false.

References:
https://learn.microsoft.com/en-us/azure/app-service/
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/app_service#websockets_enabled

Policy Details

Rule Reference ID: AC_AZURE_0193
CSP: Azure
Remediation Available: Yes
Resource Category: Serverless
Resource Type: App Service

Frameworks