Network Config Validation
Use this skill to review network configuration before a change window or before an automation run touches production devices.
When to Use
- Reviewing Cisco IOS or IOS-XE style snippets before deployment.
- Auditing generated config from scripts or templates.
- Looking for dangerous commands, duplicate IP addresses, or subnet overlaps.
- Checking whether ACLs, route-maps, prefix-lists, or line policies are referenced but not defined.
- Building lightweight pre-flight scripts for network automation.
How It Works
Treat config validation as layered evidence, not as a complete parser. Regex checks are useful for pre-flight warnings, but final approval still needs a network engineer to review intent, platform syntax, and rollback steps.
Validate in this order:
- Destructive commands.
- Credential and management-plane exposure.
- Duplicate addresses and overlapping subnets.
- Stale references to ACLs, route-maps, prefix-lists, and interfaces.
- Operational hygiene such as NTP, timestamps, remote logging, and banners.
Dangerous Command Detection
import re
DANGEROUS_PATTERNS: list[tuple[re.Pattern[str], str]] = [
(re.compil…