-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a819274
commit 302890e
Showing
5 changed files
with
91 additions
and
31 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
checkov/terraform/checks/graph_checks/azure/AzureStorageAccConfigSharedKeyAuth.yaml
This file contains 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
This file contains 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
58 changes: 41 additions & 17 deletions
58
checkov/terraform/checks/graph_checks/azure/AzureVMconfigPublicIP_SerialConsoleAccess.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,52 @@ | ||
metadata: | ||
id: "CKV_AZURE_228" | ||
id: "CKV2_AZURE_39" | ||
|
||
name: "Ensure Azure VM is not configured with public IP and serial console access" | ||
category: "GENERAL_SECURITY" | ||
category: "NETWORKING" | ||
|
||
definition: | ||
and: | ||
- cond_type: filter | ||
attribute: resource_type | ||
value: | ||
- azurerm_network_interface | ||
operator: within | ||
or: | ||
- and: | ||
- cond_type: filter | ||
attribute: resource_type | ||
value: | ||
- azurerm_network_interface | ||
operator: within | ||
|
||
- resource_types: | ||
- azurerm_network_interface | ||
connected_resource_types: | ||
- azurerm_linux_virtual_machine | ||
- azurerm_windows_virtual_machine | ||
- azurerm_virtual_machine | ||
operator: exists | ||
cond_type: connection | ||
|
||
- cond_type: attribute | ||
resource_types: | ||
- azurerm_network_interface | ||
attribute: ip_configuration.public_ip_address_id | ||
operator: length_greater_than | ||
value: 0 | ||
|
||
- cond_type: attribute | ||
resource_types: | ||
- azurerm_linux_virtual_machine | ||
- azurerm_windows_virtual_machine | ||
- azurerm_virtual_machine | ||
attribute: boot_diagnostics | ||
operator: not_exists | ||
|
||
- resource_types: | ||
- cond_type: attribute | ||
resource_types: | ||
- azurerm_network_interface | ||
connected_resource_types: | ||
- azurerm_linux_virtual_machine | ||
- azurerm_windows_virtual_machine | ||
- azurerm_virtual_machine | ||
operator: exists | ||
cond_type: connection | ||
attribute: ip_configuration.public_ip_address_id | ||
operator: not_exists | ||
|
||
- cond_type: attribute | ||
resource_types: | ||
- azurerm_network_interface | ||
- azurerm_network_interface | ||
attribute: ip_configuration.public_ip_address_id | ||
operator: length_greater_than | ||
operator: length_less_than_or_equal | ||
value: 0 | ||
|
3 changes: 2 additions & 1 deletion
3
.../terraform/graph/checks/resources/AzureVMconfigPublicIP_SerialConsoleAccess/expected.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pass: | ||
- "azurerm_network_interface.pass_int" | ||
- "azurerm_network_interface.pass_int_1" | ||
- "azurerm_network_interface.pass_int_2" | ||
fail: | ||
- "azurerm_network_interface.fail_int" |
This file contains 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