A cloud-native solution that protects workloads across hybrid and multi-cloud environments with threat detection and security recommendations
Defender for Cloud security recommendations are generated strictly according to the built‑in policies and their current implementation. An NSG rule with Source = Any and Destination = Any does not automatically guarantee that an active recommendation will be shown; it must match the exact conditions of one of the NSG‑related recommendations that are currently in effect.
From the networking recommendations in Defender for Cloud, NSG‑related items include, for example:
- All network ports should be restricted on network security groups associated to your virtual machine – flags NSGs whose inbound rules are too permissive, such as allowing access from “Any” or “Internet” ranges.
- Internet‑facing virtual machines should be protected with network security groups – flags VMs without NSGs on internet‑facing subnets.
- Adaptive network hardening recommendations should be applied on internet facing virtual machines – flags NSGs whose effective rules are more permissive than Defender’s learned baseline.
If these recommendations are currently shown as Completed for the VM, it means that, based on the last assessment, Defender for Cloud evaluated the effective NSG configuration and determined that it no longer violates the specific policy logic (for example, the rule might not be considered internet‑facing, or the effective exposure does not meet the policy’s criteria). In that case, no new or active recommendation is triggered, even if a rule appears broadly scoped.
To verify the effective NSG rules that Defender for Cloud is assessing, list the NSG rules attached to the VM’s NIC or subnet and confirm which rules actually allow inbound traffic from Any or Internet:
az network nsg rule list \
--resource-group <rg-name> \
--nsg-name <nsg-name> \
--include-default
If the effective rules truly are overly permissive but no recommendation appears, the behavior is typically due to the exact policy conditions not being met (for example, not classified as internet‑facing, or covered by a deprecated/changed recommendation). In that case, harden the NSG manually (restrict source ranges and ports) even without an active Defender for Cloud recommendation.
References: