-
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.
Merge branch 'main' into get-custom-policy-severities
- Loading branch information
Showing
115 changed files
with
6,750 additions
and
3,036 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
18 changes: 18 additions & 0 deletions
18
checkov/arm/checks/resource/AppServiceDetailedErrorMessagesEnabled.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,18 @@ | ||
from __future__ import annotations | ||
from checkov.arm.base_resource_value_check import BaseResourceValueCheck | ||
from checkov.common.models.enums import CheckCategories | ||
|
||
|
||
class AppServiceDetailedErrorMessagesEnabled(BaseResourceValueCheck): | ||
def __init__(self) -> None: | ||
name = "Ensure that App service enables detailed error messages" | ||
id = "CKV_AZURE_65" | ||
supported_resources = ['Microsoft.Web/sites/config'] | ||
categories = [CheckCategories.LOGGING] | ||
super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources) | ||
|
||
def get_inspected_key(self) -> str: | ||
return "properties/detailedErrorLoggingEnabled" | ||
|
||
|
||
check = AppServiceDetailedErrorMessagesEnabled() |
20 changes: 20 additions & 0 deletions
20
checkov/arm/checks/resource/AppServiceDotnetFrameworkVersion.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,20 @@ | ||
from checkov.common.models.enums import CheckCategories | ||
from checkov.arm.base_resource_value_check import BaseResourceValueCheck | ||
|
||
|
||
class AppServiceDotnetFrameworkVersion(BaseResourceValueCheck): | ||
def __init__(self) -> None: | ||
name = "Ensure that 'Net Framework' version is the latest, if used as a part of the web app" | ||
id = "CKV_AZURE_80" | ||
supported_resources = ['Microsoft.Web/sites/config'] | ||
categories = [CheckCategories.GENERAL_SECURITY] | ||
super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources) | ||
|
||
def get_inspected_key(self) -> str: | ||
return "properties/netFrameworkVersion" | ||
|
||
def get_expected_value(self) -> str: | ||
return "v7.0" | ||
|
||
|
||
check = AppServiceDotnetFrameworkVersion() |
Oops, something went wrong.