Verify that Microsoft Defender for Containers Is Set To 'On'

Framework Reference: 9.1.4.1 Microsoft Defender for Containers – Azure Defender for Cloud (Level 2)

Why this matters

Containerized workloads—such as Kubernetes clusters, container registries, and running container images—introduce dynamic and distributed attack surfaces. Without dedicated runtime protection and vulnerability management, misconfigurations and exploitable images can remain undetected.

Microsoft Defender for Containers strengthens defense-in-depth by providing:

  • Vulnerability assessment for container images
  • Runtime threat detection for Kubernetes workloads
  • Security posture management via Azure Policy
  • Agentless scanning and discovery capabilities

If this plan is disabled, container workloads may lack centralized threat detection, vulnerability insights, and continuous monitoring. This increases the risk of undetected compromises, supply chain attacks, and compliance violations.

Note: Microsoft Defender for Container Registries (ContainerRegistry) is deprecated and replaced by Microsoft Defender for Containers (Containers).


What this check does

This Auto Check verifies that Microsoft Defender for Containers is enabled at the subscription level and that all required protection components are active.

Check Logic

Passes if:

  • Pricing tier for Containers is set to Standard, and
  • The following extensions are enabled (isEnabled = True):
  • ContainerRegistriesVulnerabilityAssessments
  • AgentlessDiscoveryForKubernetes
  • AgentlessVmScanning
  • ContainerSensor

Fails if:

  • Pricing tier is Free, Disabled, or unset, or
  • Any required extension is disabled.

Applies to:

  • All Azure subscriptions
  • Kubernetes clusters (AKS and connected clusters)
  • Azure Container Registries
  • Multi-cloud and hybrid container workloads connected to Defender for Cloud

The check queries Microsoft Defender for Cloud pricing configuration via Azure Security APIs.


How to fix it

Enable Microsoft Defender for Containers and all required extensions.

Azure Portal

  1. Go to Microsoft Defender for Cloud.
  2. Select Environment settings.
  3. Choose the relevant subscription.
  4. Open Defender plans.
  5. Under Cloud Workload Protection (CWP), locate Containers.
  6. Set Status to On.
  7. If Monitoring coverage shows Partial, open Settings.
  8. Enable all components.
  9. Click Save.
  10. Repeat for each subscription.

Azure CLI

Run:

az security pricing create \  -n 'Containers' \  --tier 'standard' \  --extensions name=ContainerRegistriesVulnerabilityAssessments isEnabled=True \  --extensions name=AgentlessDiscoveryForKubernetes isEnabled=True \  --extensions name=AgentlessVmScanning isEnabled=True \  --extensions name=ContainerSensor isEnabled=True

Repeat for each subscription as needed.


PowerShell

Run:

Set-AzSecurityPricing -Name 'Containers' -PricingTier 'Standard' -Extension ` '[{"name":"ContainerRegistriesVulnerabilityAssessments","isEnabled":"True"}, {"name":"AgentlessDiscoveryForKubernetes","isEnabled":"True"}, {"name":"AgentlessVmScanning","isEnabled":"True"}, {"name":"ContainerSensor","isEnabled":"True"}]'

Repeat for each subscription.


Default value

Microsoft Defender for Containers is disabled by default.


Impact

Incurs additional cost per vCore.

Pricing depends on monitored workloads and enabled extensions.

Cost estimation should be reviewed before enabling across multiple subscriptions.


Exceptions

  • No standard exceptions are recommended for production environments.
  • If Defender for Containers must remain disabled:
  • Document the business justification.
  • Implement alternative runtime protection and vulnerability scanning controls.
  • Ensure centralized logging and threat detection is in place.

Further resources

  1. https://learn.microsoft.com/en-us/cli/azure/security/pricing
  2. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing 
  3. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritypricing 
  4. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-containers-introduction
  5. https://learn.microsoft.com/en-us/azure/defender-for-cloud/tutorial-enable-containers-azure
  6. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-1-enable-threat-detection-capabilities 

Was this article helpful?