Open
Conversation
Comment on lines
+31
to
+47
| resource "azurerm_network_security_group" "nsg-fail" { | ||
| name = "insecureNSG" | ||
| location = azurerm_resource_group.rg-aks.location | ||
| resource_group_name = azurerm_resource_group.rg-aks.name | ||
|
|
||
| security_rule { | ||
| name = "badrule" | ||
| priority = 100 | ||
| direction = "Inbound" | ||
| access = "Allow" | ||
| protocol = "*" | ||
| source_port_range = "*" | ||
| destination_port_range = "*" | ||
| source_address_prefix = "*" | ||
| destination_address_prefix = "*" | ||
| } | ||
| } |
Check failure
Code scanning / checkov
Ensure that SSH access is restricted from the internet
Comment on lines
+31
to
+47
| resource "azurerm_network_security_group" "nsg-fail" { | ||
| name = "insecureNSG" | ||
| location = azurerm_resource_group.rg-aks.location | ||
| resource_group_name = azurerm_resource_group.rg-aks.name | ||
|
|
||
| security_rule { | ||
| name = "badrule" | ||
| priority = 100 | ||
| direction = "Inbound" | ||
| access = "Allow" | ||
| protocol = "*" | ||
| source_port_range = "*" | ||
| destination_port_range = "*" | ||
| source_address_prefix = "*" | ||
| destination_address_prefix = "*" | ||
| } | ||
| } |
Check failure
Code scanning / checkov
Ensure that RDP access is restricted from the internet
Comment on lines
+31
to
+47
| resource "azurerm_network_security_group" "nsg-fail" { | ||
| name = "insecureNSG" | ||
| location = azurerm_resource_group.rg-aks.location | ||
| resource_group_name = azurerm_resource_group.rg-aks.name | ||
|
|
||
| security_rule { | ||
| name = "badrule" | ||
| priority = 100 | ||
| direction = "Inbound" | ||
| access = "Allow" | ||
| protocol = "*" | ||
| source_port_range = "*" | ||
| destination_port_range = "*" | ||
| source_address_prefix = "*" | ||
| destination_address_prefix = "*" | ||
| } | ||
| } |
Check failure
Code scanning / checkov
Ensure that HTTP (port 80) access is restricted from the internet
Terraform Plan OutputClick to expandTerraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# azurerm_network_security_group.nsg-fail will be created
+ resource "azurerm_network_security_group" "nsg-fail" {
+ id = (known after apply)
+ location = "eastus"
+ name = "insecureNSG"
+ resource_group_name = "rg-terraform-github-actions"
+ security_rule = [
+ {
+ access = "Allow"
+ description = ""
+ destination_address_prefix = "*"
+ destination_address_prefixes = []
+ destination_application_security_group_ids = []
+ destination_port_range = "*"
+ destination_port_ranges = []
+ direction = "Inbound"
+ name = "badrule"
+ priority = 100
+ protocol = "*"
+ source_address_prefix = "*"
+ source_address_prefixes = []
+ source_application_security_group_ids = []
+ source_port_range = "*"
+ source_port_ranges = []
},
]
}
Plan: 1 to add, 0 to change, 0 to destroy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a sample PR that shows adding in a vulnerable resource. Checkov should raise alerts and the bad resource will get highlighted here using GitHub Advanced Security (GHAS).