github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/azure/network/ssh_blocked_from_internet.tf.go (about) 1 package network 2 3 var terraformSshBlockedFromInternetGoodExamples = []string{ 4 ` 5 resource "azurerm_network_security_rule" "good_example" { 6 name = "good_example_security_rule" 7 direction = "Inbound" 8 access = "Allow" 9 protocol = "TCP" 10 source_port_range = "*" 11 destination_port_range = "22" 12 source_address_prefix = "82.102.23.23" 13 destination_address_prefix = "*" 14 } 15 `, 16 } 17 18 var terraformSshBlockedFromInternetBadExamples = []string{ 19 ` 20 resource "azurerm_network_security_rule" "bad_example" { 21 name = "bad_example_security_rule" 22 direction = "Inbound" 23 access = "Allow" 24 protocol = "TCP" 25 source_port_range = "*" 26 destination_port_range = "22" 27 source_address_prefix = "*" 28 destination_address_prefix = "*" 29 } 30 `, 31 } 32 33 var terraformSshBlockedFromInternetLinks = []string{ 34 `https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/network_security_group#security_rule`, `https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_rule#source_port_ranges`, 35 } 36 37 var terraformSshBlockedFromInternetRemediationMarkdown = ``