Skip to main content
orphan · azure

Network security groups attached to no subnet and no NIC

resource types
1
rule IDs covered
1
severity
low

What does ZopNight detect here?

An Azure NSG is free, so ZopNight reports detached security groups as a $0 hygiene finding, not a saving. The rule hardcodes zero and ignores pricing entirely. Detection reads the discoverer's associated flag: an NSG linked to 0 subnets and 0 network interfaces protects nothing.

Signal and threshold

How ZopNight evaluates Network security groups attached to no subnet and no NIC.
Field Value
Rule IDsRC-1361
Categoryorphan
Severitylow
Metricnone — pure configuration read
Sourcensg_unused.go

Rules that guard nothing

A network security group only does its job while attached to a subnet or a NIC. Detached, it is a list of allow/deny rules enforcing nothing, usually the residue of a deleted VM or a rebuilt network. The discoverer checks both association surfaces and stamps the NSG’s state; only an explicit not-associated verdict fires the rule. Unknown association state fails safe and is never flagged.

A finding that refuses to invent dollars

NSGs carry no standing charge, so the honest saving from deleting one is exactly $0, and that is what the recommendation says. The rule’s pricing injection is a deliberate no-op: even if a cost entry collided onto the NSG’s identifier, it could not surface as a fabricated saving. The finding rides in ZopNight’s orphan category, which is exempt from the minimum-dollar filter precisely so zero-dollar cleanup work stays visible.

Why bother, then

Orphaned NSGs cost attention rather than money. Every security review, terraform plan, and incident investigation has to reason about them; a stale NSG with permissive rules is a ready-made mistake when someone attaches it to the wrong subnet later. Fewer unowned security objects means a smaller audit surface. In subscriptions several years old it is common to find dozens of these, one per deleted VM, each preserving the inbound rules of a machine that no longer exists.

Find detached NSGs across a subscription

Terminal window
az network nsg list \
--query "[?subnets==null && networkInterfaces==null].{name:name, rg:resourceGroup}" \
-o table

Or inspect one NSG’s associations directly:

Terminal window
az network nsg show -n <nsg> -g <rg> --query "{subnets: subnets, nics: networkInterfaces}"

Keep or delete

Some teams intentionally stage NSGs ahead of attachment: a golden ruleset waiting for the next environment. If that is the case, document it where the next reviewer will look. Otherwise delete: the rules are recoverable from source control or the activity log, and recreating an NSG takes minutes.

What the rule never does

No metrics are read, no cost map is consulted, and no automation deletes an NSG on ZopNight’s behalf. The finding is informational. Reader alone reproduces the entire detection.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

417 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

417 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·