Skip to content

Commit

Permalink
feat(arm): implement CKV_AZURE_113 for ARM (#5510)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Sep 3, 2023
1 parent 5a51de9 commit 094cb79
Show file tree
Hide file tree
Showing 4 changed files with 1,264 additions and 0 deletions.
21 changes: 21 additions & 0 deletions checkov/arm/checks/resource/SQLServerHasPublicAccessDisabled.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from checkov.common.models.enums import CheckCategories, CheckResult
from checkov.arm.base_resource_value_check import BaseResourceValueCheck


class SQLServerHasPublicAccessDisabled(BaseResourceValueCheck):
def __init__(self) -> None:
name = "Ensure that SQL server disables public network access"
id = "CKV_AZURE_113"
supported_resources = ["Microsoft.Sql/servers"]
categories = [CheckCategories.NETWORKING]
super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources,
missing_block_result=CheckResult.FAILED)

def get_inspected_key(self) -> str:
return 'properties/publicNetworkAccess'

def get_expected_value(self) -> str:
return "Disabled"


check = SQLServerHasPublicAccessDisabled()
Loading

0 comments on commit 094cb79

Please sign in to comment.