Repository: bridgecrewio/checkov

Issue:
CKV_AZURE_80 outdated
**Describe the issue**
We are using Terraform to setup a windows service. We use resource of type "azurerm_windows_web_app", so that the rule CKV_AZURE_80 is applied / checked:

[Source](https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py)

**Examples**

Our config looks as:
```
resource "azurerm_windows_web_app" "app-service" {
...
  site_config {
    default_documents = ["readme.html", "index.html"]
    always_on         = true
    ftps_state        = "Disabled"
    http2_enabled     = true
    application_stack {
      dotnet_version = "v8.0"
    }
  }
...
}
```

We get:
[None][CKV_AZURE_80] Ensure that 'Net Framework' version is the latest, if used as a part of the web app.
From the sources it seems it expects dotnet v7.0, so it shall be updated to accept all LTS.

**Version (please complete the following information):**
 - Checkov Version 3.2.44



Discussion:

Patch:
diff --git a/checkov/arm/checks/resource/AppServiceDotnetFrameworkVersion.py b/checkov/arm/checks/resource/AppServiceDotnetFrameworkVersion.py
index 7cce9eae3f..415d32c6ac 100644
--- a/checkov/arm/checks/resource/AppServiceDotnetFrameworkVersion.py
+++ b/checkov/arm/checks/resource/AppServiceDotnetFrameworkVersion.py
@@ -14,7 +14,7 @@ def get_inspected_key(self) -> str:
         return "properties/netFrameworkVersion"
 
     def get_expected_value(self) -> str:
-        return "v7.0"
+        return "v8.0"
 
 
 check = AppServiceDotnetFrameworkVersion()
diff --git a/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py b/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py
index d3d86d4115..2249f55ac5 100644
--- a/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py
+++ b/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py
@@ -21,14 +21,14 @@ def scan_resource_conf(self, conf) -> CheckResult:
             if site_config.get('application_stack') and isinstance(site_config.get('application_stack'), list):
                 stack = site_config.get('application_stack')[0]
                 if stack.get('dotnet_version') and isinstance(stack.get('dotnet_version'), list):
-                    if stack.get('dotnet_version')[0] == "v7.0":
+                    if stack.get('dotnet_version')[0] == "v8.0":
                         return CheckResult.PASSED
                     return CheckResult.FAILED
 
         return CheckResult.UNKNOWN
 
     def get_expected_values(self) -> List[str]:
-        return ["v6.0", "v7.0"]
+        return ["v6.0", "v8.0"]
 
 
 check = AppServiceDotnetFrameworkVersion()


Test patch:
diff --git a/tests/arm/checks/resource/example_AppServiceDotnetFrameworkVersion/passed.json b/tests/arm/checks/resource/example_AppServiceDotnetFrameworkVersion/passed.json
index 074e4fdfde..04a41face4 100644
--- a/tests/arm/checks/resource/example_AppServiceDotnetFrameworkVersion/passed.json
+++ b/tests/arm/checks/resource/example_AppServiceDotnetFrameworkVersion/passed.json
@@ -111,7 +111,7 @@
                     "index.php",
                     "hostingstart.html"
                 ],
-                "netFrameworkVersion": "v7.0",
+                "netFrameworkVersion": "v8.0",
                 "phpVersion": "5.6",
                 "requestTracingEnabled": true,
                 "requestTracingExpirationTime": "9999-12-31T23:59:00Z",
diff --git a/tests/terraform/checks/resource/azure/example_AppServiceDotnetFrameworkVersion/main.tf b/tests/terraform/checks/resource/azure/example_AppServiceDotnetFrameworkVersion/main.tf
index f63e4acf95..ea888fe46d 100644
--- a/tests/terraform/checks/resource/azure/example_AppServiceDotnetFrameworkVersion/main.tf
+++ b/tests/terraform/checks/resource/azure/example_AppServiceDotnetFrameworkVersion/main.tf
@@ -74,7 +74,7 @@ resource "azurerm_windows_web_app" "pass" {
     http2_enabled     = true
     health_check_path = var.health_check_path
     application_stack {
-      dotnet_version = "v7.0"
+      dotnet_version = "v8.0"
     }
   }