Skip to content

Azure App service HTTP logging is disabled

Description

By enabling HTTP logging for your app service, you can collect this information and use it to monitor and troubleshoot your app, as well as identify any potential security issues or threats. This can help to ensure that your app is running smoothly and is secure from potential attacks.

Code Example

go
resource "azurerm_app_service" "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
            
+             logs {
+               http_logs {
                    retention_in_days = 4
                    retention_in_mb = 10
                }
              }
            
              app_settings = {
                "SOME_KEY" = "some-value"
              }
            
              connection_string {
                name  = "Database"
                type  = "SQLServer"
                value = "Server=some-server.mydomain.com;Integrated Security=SSPI"
              }
            }

Remediation

Terraform

  • Resource: azurerm_app_service
  • Arguments: logs.http_logs

Rule Details

FieldValue
IDIAC-0571
SeverityLOW
IaC Typearm
FrameworksTerraform, TerraformPlan
Checkov IDCKV_AZURE_63

References