Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def scan_resource_conf(self, conf) -> CheckResult:
site_config = conf.get('site_config')[0]
if site_config.get('dotnet_framework_version') and isinstance(site_config.get('dotnet_framework_version'), list):
version = site_config.get('dotnet_framework_version')[0]
if not isinstance(version, str):
return CheckResult.UNKNOWN
if version in supported_versions:
return CheckResult.PASSED
self.evaluated_keys = ['site_config/[0]/dotnet_framework_version']
Expand All @@ -31,6 +33,8 @@ def scan_resource_conf(self, conf) -> CheckResult:
stack = site_config.get('application_stack')[0]
if stack.get('dotnet_version') and isinstance(stack.get('dotnet_version'), list):
version = stack.get('dotnet_version')[0]
if not isinstance(version, str):
return CheckResult.UNKNOWN
if version in supported_versions:
return CheckResult.PASSED
self.evaluated_keys = ['site_config/[0]/application_stack/[0]/dotnet_version']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,33 @@ resource "azurerm_windows_web_app" "fail2" {
}
}

# UNKNOWN - dotnet_version is a non-string value (triggers CKV_AZURE_80 crash guard)
resource "azurerm_windows_web_app" "unknown" {
#checkov:skip=CKV_AZURE_16: AD might not be required
name = var.name
location = var.location
resource_group_name = var.rg_name
service_plan_id = var.service_plan_id

https_only = true

site_config {
application_stack {
dotnet_version = {}
}
}

client_certificate_enabled = true

auth_settings {
enabled = true
}

identity {
type = "SystemAssigned"
}
}

# IGNORE - no dotnet version specified
resource "azurerm_windows_web_app" "ignore" {
#checkov:skip=CKV_AZURE_16: AD might not be required
Expand Down