labs/zava-learning/sre-config/agent-config/skills/nsg-audit/SKILL.md
Use when an operator or a scheduled task requests a periodic Network Security Group (NSG) and connectivity-path audit of the Zava Learning resource group — enumerate every NSG and its rules, trace the full path (NSGs, UDRs / route tables, Private Endpoints, DNS, and any firewall), flag overly-permissive, shadowed, unused, or orphaned rules, and recommend least-exposure corrections. Read-only; produces findings for a report.
npx skillsauth add microsoft/sre-agent nsg-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Resource Group: @@RG@@. Read-only audit — never create, modify, or delete an NSG, rule, route, or
firewall. This is a weekly posture review of the lab's network exposure and the integrity of its
connectivity paths, not an incident response.
az network nsg list -g @@RG@@.az network nsg rule list -g @@RG@@ --nsg-name <nsg> --include-default.az network nsg show -g @@RG@@ -n <nsg> --query "{subnets:subnets[].id, nics:networkInterfaces[].id}"). An NSG attached to no subnet and
no NIC is orphaned — itself a finding.Flag, with an impact-based severity (see the zava-audit-report severity model):
Allow from * / Internet / 0.0.0.0/0 to a management port
(22 SSH, 3389 RDP); a blanket Allow *:* * (any source, any port, any protocol); or a rule whose
description marks it temporary / break-glass ("temp", "troubleshooting", "INC-####") that is
still present.Allow from a broad source (large CIDR / Internet) to a data or admin port
(e.g. 5432 Postgres, 6379 Redis, 1433, 27017, 8080-808x app-management ports) where the source
should be a known subnet / Application Gateway only.A real network audit follows the whole path. Enumerate and assess each layer, and flag misconfigurations:
az network route-table list -g @@RG@@ and az network route-table route list. Flag routes that bypass a firewall / NVA (e.g. 0.0.0.0/0 -> Internet where an appliance
is expected), black-hole routes (nextHopType=None), routes to decommissioned next hops, and route
tables not associated with any subnet.az network private-endpoint list -g @@RG@@; for data services
(Postgres, Key Vault, Storage) check whether access is via Private Endpoint or left on a public
endpoint, and whether the matching Private DNS zone + VNet link exist
(az network private-dns zone list, ... link vnet list). Flag a data service exposed publicly when
a Private Endpoint is expected, or a Private Endpoint with a missing/dangling DNS zone link (which
silently breaks name resolution).az network firewall list -g @@RG@@),
check that subnet UDRs actually force egress through it and review overly-permissive network/application
rules; if none is present, note that egress is direct and whether that is acceptable for the lab.
Where a control reference helps, cite Azure network-security guidance via
microsoft-learn_microsoft_docs_search (deny-by-default, just-in-time access, hub-spoke segmentation,
Private Link, forced tunneling).For every finding output a row: Layer (NSG/UDR/PE/DNS/FW) · Resource · Rule/Route · Source → Dest:Port · Finding · Severity · Recommended fix. Sort SEV1 → SEV3. Also produce a short posture summary
(Healthy / Needs attention / At risk, counts by severity, the single most important action) and a
prioritized recommendations list.
This skill does not remediate. Pass the posture summary, the findings rows (each with its severity),
and the recommendations to the zava-audit-report skill, which renders the single branded,
downloadable PowerPoint deck and returns its download link. Surface that link to the operator.
development
Use to package a completed Zava Learning incident analysis for the audience. First present a branded in-thread executive summary (markdown with the before/after visuals inline), then produce the downloadable deliverables — a PowerPoint deck, an HTML email, and a Teams notification — using the Zava corporate template. The calling agent may narrow this to a subset (e.g. only the HTML report). Produces content and artifacts; it does not send them. Assembles the output of rca-analysis, evidence-before-after, recommendations-next-steps, and pr-delivery.
development
Use to package a completed Zava Learning weekly governance audit (NSG / network security, RBAC / least-privilege, or cloud cost) into a single branded, downloadable PowerPoint deck in the Zava house style. The calling audit agent passes its findings (a list of rows with severity) and a short posture summary; this skill renders the deck, applies redaction, and returns the attachment download link. Produces the artifact; it does not send it.
development
Use whenever a Zava Learning investigation produces a durable fix that needs change management — after a GitHub PR is opened for an Infrastructure-as-Code or application code root cause, raise a ServiceNow Change Request referencing the PR and attach the RCA report. The single owner of ServiceNow Change Request and attachment operations.
development
Use whenever you are about to emit operator-visible content — a chat/thread message, a PagerDuty or ServiceNow note, a commit message or pull-request body, or any report artifact (HTML, PowerPoint, Teams card). Deterministically masks secrets, credentials, tokens, private keys, URI-embedded passwords, and PII so they never appear in the thread or in any deliverable. This is a cross-cutting guardrail invoked by the output-producing skills, not a runbook step.