`az vm/vmss create`: `--nsg-rule` should default to `NONE`
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Context
`--nsg-rule` from `az vm create` by default opens port `3389` for RDP on Windows VM and port `22` for SSH on Linux VM to **public internet**:
```
> az vm create --help
...
--nsg-rule : NSG rule to create when creating
a new NSG. Defaults to open
ports for allowing RDP on
Windows and allowing SSH on
Linux. NONE represents no NSG
rule. Allowed values: NONE,
RDP, SSH.
```
This imposes a security risk and will trigger sev 2 IcM. If this behavior is considered insecure Microsoft/Azure internally, it is considered insecure externally for public users.
## Proposed solution
`--nsg-rule` should be default to `NONE`. User must explicitly specify `RDP` or `SSH`.
Contributor guide
Assessment
This issue has not been assessed yet.