Skip to content
s1ns3nz0 | Known Unknowns
Go back

Adding an Azure Subnet NSG Check to Prowler

2 min read

Subnets create a natural boundary for workload segmentation. Without an associated Network Security Group (NSG), that boundary has no subnet-level filtering to enforce the intended traffic model when other controls fail or change.

Prowler PR #11043 adds network_subnet_nsg_associated, which identifies applicable Azure virtual-network subnets without an NSG.

Why NSG association matters

NSGs control inbound and outbound traffic with rules that apply consistently at a subnet boundary. They are a defense-in-depth control for separating application tiers, restricting administrative access, and limiting unexpected network paths.

An NSG does not replace private endpoints, application authentication, or host-level protections. It provides a policy layer that can be reviewed as the network evolves.

What the new check does

Prowler evaluates each subnet discovered in an Azure virtual network.

Apply a usable traffic baseline

Associate each application subnet with an NSG and define only the inbound and outbound paths the workload needs. Review service tags, private endpoints, and dependencies before enforcing deny rules; an overly broad rule is not a useful boundary, while an overly restrictive one can break essential services.

Associate an existing NSG with a subnet through the Azure CLI:

az network vnet subnet update \
  --resource-group <resource-group> \
  --vnet-name <vnet-name> \
  --name <subnet-name> \
  --network-security-group <nsg-name>

Terraform can keep the association separate from the subnet and NSG resource definitions:

resource "azurerm_subnet_network_security_group_association" "example" {
  subnet_id                 = azurerm_subnet.example.id
  network_security_group_id = azurerm_network_security_group.example.id
}

Review the whole network path

Review effective security rules, route tables, peering, and firewall policies together. A subnet’s posture depends on the combination of these controls, while Prowler makes the absence of the NSG baseline visible.

network_subnet_nsg_associated turns a segmentation question into repeatable evidence: does every applicable subnet have a traffic-policy boundary?

#Azure #NetworkSecurity #NSG #Prowler #Contribution #CSPM #CloudSecurity #Cloud


Share this post:

Previous Post
Adding an Azure VNet DDoS Protection Check to Prowler
Next Post
Adding an Azure MySQL High Availability Check to Prowler