-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(arm): AzureDefenderOnSqlServersVMS - checks resource is a SQL with tier "Standard". #6321
base: main
Are you sure you want to change the base?
Conversation
def __init__(self): | ||
name = "Ensure that Azure Defender is set to On for SQL servers on machines" | ||
id = "CKV_AZURE_79" | ||
supported_resources = ("Microsoft.Cache/Redis",) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should be Microsoft.Security/pricings
type and not Microsoft.Cache/Redis
|
||
def scan_resource_conf(self, conf: Dict[str, Any]) -> CheckResult: | ||
properties = conf.get("properties", {}) | ||
resourceType = properties.get("resourceType") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is resourceType
in this resource, we can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so how do we det to the "resourceType": "SqlServerVirtualMachines" to test it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont need it for ARM
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
New/Edited policies (Delete if not relevant)
Description
The function scan_resource_conf checks if a specific resource is a SQL Server with tier "Standard". If so, it returns a failure result; otherwise, it returns a success result.
Fix
The function checks if a resource is a SQL Server Virtual Machine with tier "Standard" and returns a pass or fail result accordingly.
Checklist: