-
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
Showing
24 changed files
with
2,528 additions
and
2,281 deletions.
There are no files selected for viewing
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
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
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
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
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
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
17 changes: 17 additions & 0 deletions
17
checkov/terraform/checks/resource/azure/AppServiceEnvironmentZoneRedundant.py
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from checkov.common.models.enums import CheckCategories | ||
from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck | ||
|
||
|
||
class AppServiceEnvironmentZoneRedundant(BaseResourceValueCheck): | ||
def __init__(self) -> None: | ||
name = "Ensure App Service Environment is zone redundant" | ||
id = "CKV_AZURE_231" | ||
supported_resources = ("azurerm_app_service_environment_v3",) | ||
categories = (CheckCategories.BACKUP_AND_RECOVERY,) | ||
super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources) | ||
|
||
def get_inspected_key(self) -> str: | ||
return "zone_redundant" | ||
|
||
|
||
check = AppServiceEnvironmentZoneRedundant() |
35 changes: 35 additions & 0 deletions
35
checkov/terraform/checks/resource/azure/RedisCacheStandardReplicationEnabled.py
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from __future__ import annotations | ||
|
||
from typing import Any | ||
|
||
from checkov.common.models.enums import CheckCategories | ||
from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck | ||
|
||
|
||
class RedisCacheStandardReplicationEnabled(BaseResourceValueCheck): | ||
def __init__(self) -> None: | ||
""" | ||
With Standard Replication, Azure Cache for Redis has a high availability architecture | ||
that ensures your managed instance is functioning, even when outages affect | ||
the underlying virtual machines (VMs). Whether the outage is planned or unplanned outages, | ||
Azure Cache for Redis delivers greater percentage availability rates than what's attainable | ||
by hosting Redis on a single VM. | ||
An Azure Cache for Redis in the applicable tiers runs on a pair of Redis servers by default. | ||
The two servers are hosted on dedicated VMs. | ||
Open-source Redis allows only one server to handle data write requests. | ||
""" | ||
name = "Standard Replication should be enabled" | ||
id = "CKV_AZURE_230" | ||
supported_resources = ("azurerm_redis_cache",) | ||
categories = (CheckCategories.BACKUP_AND_RECOVERY,) | ||
super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources) | ||
|
||
def get_inspected_key(self) -> str: | ||
return "sku_name" | ||
|
||
def get_expected_values(self) -> list[Any]: | ||
return ["Standard", "Premium"] | ||
|
||
|
||
check = RedisCacheStandardReplicationEnabled() |
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 +1 @@ | ||
version = '3.0.19' | ||
version = '3.0.21' |
Oops, something went wrong.