prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  False positive for tests in bicep: CKV_AZURE_4, CKV_AZURE_5, CKV_AZURE_7, CKV_AZURE_8
  **Describe the issue**
  false positive for tests CKV_AZURE_4, CKV_AZURE_5, CKV_AZURE_7, CKV_AZURE_8
  
  
  **Examples**
  Here is the bicep code
   Code made shorter.
  ```
  resource aks 'Microsoft.ContainerService/managedClusters@2022-11-01' = {
    properties: {
      enableRBAC: true
      }
      addonProfiles: {
        omsAgent: {
          enabled: true
          config: {
            logAnalyticsWorkspaceResourceId: logAnalyticsWorkspaceId
          }
        }
        azurePolicy: {
          enabled: true
          config: {
            version: 'v2'
          }
        }
        kubeDashboard: {
          enabled: false
        }
      }
      networkProfile: {
        networkPlugin: 'azure'
        networkPolicy: 'azure'
      }
    }
  }
  ```
  
  **Version (please complete the following information):**
   - checkov v2.1.244
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `checkov/arm/checks/resource/AKSLoggingEnabled.py`
  Content:
  ```
  1 from checkov.common.models.enums import CheckResult, CheckCategories
  2 from checkov.arm.base_resource_check import BaseResourceCheck
  3 
  4 
  5 class AKSLoggingEnabled(BaseResourceCheck):
  6     def __init__(self):
  7         # apiVersion 2017-08-03 = Fail - No addonProfiles option to configure
  8         name = "Ensure AKS logging to Azure Monitoring is Configured"
  9         id = "CKV_AZURE_4"
  10         supported_resources = ['Microsoft.ContainerService/managedClusters']
  11         categories = [CheckCategories.KUBERNETES]
  12         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  13 
  14     def scan_resource_conf(self, conf):
  15         if conf.get("apiVersion"):
  16             if conf["apiVersion"] == "2017-08-31":
  17                 # No addonProfiles option to configure
  18                 return CheckResult.FAILED
  19 
  20         properties = conf.get("properties")
  21         if isinstance(properties, dict):
  22             addon_profiles = properties.get("addonProfiles")
  23             if isinstance(addon_profiles, dict):
  24                 omsagent = addon_profiles.get("omsagent")
  25                 if isinstance(omsagent, dict) and omsagent.get("enabled"):
  26                     return CheckResult.PASSED
  27 
  28         return CheckResult.FAILED
  29 
  30 
  31 check = AKSLoggingEnabled()
  32
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/checkov/arm/checks/resource/AKSLoggingEnabled.py b/checkov/arm/checks/resource/AKSLoggingEnabled.py
  --- a/checkov/arm/checks/resource/AKSLoggingEnabled.py
  +++ b/checkov/arm/checks/resource/AKSLoggingEnabled.py
  @@ -1,18 +1,22 @@
  +from __future__ import annotations
  +
  +from typing import Any
  +
   from checkov.common.models.enums import CheckResult, CheckCategories
   from checkov.arm.base_resource_check import BaseResourceCheck
   
   
   class AKSLoggingEnabled(BaseResourceCheck):
  -    def __init__(self):
  +    def __init__(self) -> None:
           # apiVersion 2017-08-03 = Fail - No addonProfiles option to configure
           name = "Ensure AKS logging to Azure Monitoring is Configured"
           id = "CKV_AZURE_4"
  -        supported_resources = ['Microsoft.ContainerService/managedClusters']
  -        categories = [CheckCategories.KUBERNETES]
  +        supported_resources = ("Microsoft.ContainerService/managedClusters",)
  +        categories = (CheckCategories.KUBERNETES,)
           super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
   
  -    def scan_resource_conf(self, conf):
  -        if conf.get("apiVersion"):
  +    def scan_resource_conf(self, conf: dict[str, Any]) -> CheckResult:
  +        if "apiVersion" in conf:
               if conf["apiVersion"] == "2017-08-31":
                   # No addonProfiles option to configure
                   return CheckResult.FAILED
  @@ -22,6 +26,10 @@
               addon_profiles = properties.get("addonProfiles")
               if isinstance(addon_profiles, dict):
                   omsagent = addon_profiles.get("omsagent")
  +                if not omsagent:
  +                    # it can be written in lowercase or camelCase
  +                    omsagent = addon_profiles.get("omsAgent")
  +
                   if isinstance(omsagent, dict) and omsagent.get("enabled"):
                       return CheckResult.PASSED
  
verification_info: {"golden_diff": "diff --git a/checkov/arm/checks/resource/AKSLoggingEnabled.py b/checkov/arm/checks/resource/AKSLoggingEnabled.py\n--- a/checkov/arm/checks/resource/AKSLoggingEnabled.py\n+++ b/checkov/arm/checks/resource/AKSLoggingEnabled.py\n@@ -1,18 +1,22 @@\n+from __future__ import annotations\n+\n+from typing import Any\n+\n from checkov.common.models.enums import CheckResult, CheckCategories\n from checkov.arm.base_resource_check import BaseResourceCheck\n \n \n class AKSLoggingEnabled(BaseResourceCheck):\n-    def __init__(self):\n+    def __init__(self) -> None:\n         # apiVersion 2017-08-03 = Fail - No addonProfiles option to configure\n         name = \"Ensure AKS logging to Azure Monitoring is Configured\"\n         id = \"CKV_AZURE_4\"\n-        supported_resources = ['Microsoft.ContainerService/managedClusters']\n-        categories = [CheckCategories.KUBERNETES]\n+        supported_resources = (\"Microsoft.ContainerService/managedClusters\",)\n+        categories = (CheckCategories.KUBERNETES,)\n         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n \n-    def scan_resource_conf(self, conf):\n-        if conf.get(\"apiVersion\"):\n+    def scan_resource_conf(self, conf: dict[str, Any]) -> CheckResult:\n+        if \"apiVersion\" in conf:\n             if conf[\"apiVersion\"] == \"2017-08-31\":\n                 # No addonProfiles option to configure\n                 return CheckResult.FAILED\n@@ -22,6 +26,10 @@\n             addon_profiles = properties.get(\"addonProfiles\")\n             if isinstance(addon_profiles, dict):\n                 omsagent = addon_profiles.get(\"omsagent\")\n+                if not omsagent:\n+                    # it can be written in lowercase or camelCase\n+                    omsagent = addon_profiles.get(\"omsAgent\")\n+\n                 if isinstance(omsagent, dict) and omsagent.get(\"enabled\"):\n                     return CheckResult.PASSED\n", "issue": "False positive for tests in bicep: CKV_AZURE_4, CKV_AZURE_5, CKV_AZURE_7, CKV_AZURE_8\n**Describe the issue**\r\nfalse positive for tests CKV_AZURE_4, CKV_AZURE_5, CKV_AZURE_7, CKV_AZURE_8\r\n\r\n\r\n**Examples**\r\nHere is the bicep code\r\n Code made shorter.\r\n```\r\nresource aks 'Microsoft.ContainerService/managedClusters@2022-11-01' = {\r\n  properties: {\r\n    enableRBAC: true\r\n    }\r\n    addonProfiles: {\r\n      omsAgent: {\r\n        enabled: true\r\n        config: {\r\n          logAnalyticsWorkspaceResourceId: logAnalyticsWorkspaceId\r\n        }\r\n      }\r\n      azurePolicy: {\r\n        enabled: true\r\n        config: {\r\n          version: 'v2'\r\n        }\r\n      }\r\n      kubeDashboard: {\r\n        enabled: false\r\n      }\r\n    }\r\n    networkProfile: {\r\n      networkPlugin: 'azure'\r\n      networkPolicy: 'azure'\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n**Version (please complete the following information):**\r\n - checkov v2.1.244\r\n\r\n\n", "before_files": [{"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.arm.base_resource_check import BaseResourceCheck\n\n\nclass AKSLoggingEnabled(BaseResourceCheck):\n    def __init__(self):\n        # apiVersion 2017-08-03 = Fail - No addonProfiles option to configure\n        name = \"Ensure AKS logging to Azure Monitoring is Configured\"\n        id = \"CKV_AZURE_4\"\n        supported_resources = ['Microsoft.ContainerService/managedClusters']\n        categories = [CheckCategories.KUBERNETES]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf):\n        if conf.get(\"apiVersion\"):\n            if conf[\"apiVersion\"] == \"2017-08-31\":\n                # No addonProfiles option to configure\n                return CheckResult.FAILED\n\n        properties = conf.get(\"properties\")\n        if isinstance(properties, dict):\n            addon_profiles = properties.get(\"addonProfiles\")\n            if isinstance(addon_profiles, dict):\n                omsagent = addon_profiles.get(\"omsagent\")\n                if isinstance(omsagent, dict) and omsagent.get(\"enabled\"):\n                    return CheckResult.PASSED\n\n        return CheckResult.FAILED\n\n\ncheck = AKSLoggingEnabled()\n", "path": "checkov/arm/checks/resource/AKSLoggingEnabled.py"}], "after_files": [{"content": "from __future__ import annotations\n\nfrom typing import Any\n\nfrom checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.arm.base_resource_check import BaseResourceCheck\n\n\nclass AKSLoggingEnabled(BaseResourceCheck):\n    def __init__(self) -> None:\n        # apiVersion 2017-08-03 = Fail - No addonProfiles option to configure\n        name = \"Ensure AKS logging to Azure Monitoring is Configured\"\n        id = \"CKV_AZURE_4\"\n        supported_resources = (\"Microsoft.ContainerService/managedClusters\",)\n        categories = (CheckCategories.KUBERNETES,)\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf: dict[str, Any]) -> CheckResult:\n        if \"apiVersion\" in conf:\n            if conf[\"apiVersion\"] == \"2017-08-31\":\n                # No addonProfiles option to configure\n                return CheckResult.FAILED\n\n        properties = conf.get(\"properties\")\n        if isinstance(properties, dict):\n            addon_profiles = properties.get(\"addonProfiles\")\n            if isinstance(addon_profiles, dict):\n                omsagent = addon_profiles.get(\"omsagent\")\n                if not omsagent:\n                    # it can be written in lowercase or camelCase\n                    omsagent = addon_profiles.get(\"omsAgent\")\n\n                if isinstance(omsagent, dict) and omsagent.get(\"enabled\"):\n                    return CheckResult.PASSED\n\n        return CheckResult.FAILED\n\n\ncheck = AKSLoggingEnabled()\n", "path": "checkov/arm/checks/resource/AKSLoggingEnabled.py"}]}