Development tools and frameworks usually have options to make debugging easier for developers. Although these features are useful during development, they should never be enabled for applications deployed in production. Debug instructions or error messages can leak detailed information about the system, like the application’s path or file names.
There is a risk if you answered yes to any of those questions.
Do not enable debugging features on production servers or applications distributed to end users.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "templateDebug",
"properties": {
"debugSetting": { "detailLevel": "RequestContent, ResponseContent" }
}
}
]
}
resource templateDebug 'Microsoft.Resources/deployments@2022-09-01' = {
name: 'templateDebug'
properties: {
debugSetting: { // Noncompliant
detailLevel: 'RequestContent, ResponseContent'
}
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "templateDebug",
"properties": {}
}
]
}
resource templateDebug 'Microsoft.Resources/deployments@2022-09-01' = {
name: 'templateDebug'
}