-
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): add CKV_AZURE_85 to ensure that Azure Defender is set to On for Kubernetes #6279
base: main
Are you sure you want to change the base?
feat(arm): add CKV_AZURE_85 to ensure that Azure Defender is set to On for Kubernetes #6279
Conversation
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.
Great Job!
Left some comments
report = Runner().run(root_folder=str(test_files_dir), runner_filter=RunnerFilter(checks=[check.id])) | ||
|
||
# then | ||
summary = report.get_summary() |
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.
Please assert the resources names as well
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.
Please ☝️
super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources,) | ||
|
||
def scan_resource_conf(self, conf: dict[str, list[Any]]) -> CheckResult: | ||
if "name" in conf: |
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.
Why not use the same condition as in the TF check?
def scan_resource_conf(self, conf: dict[str, Any]) -> CheckResult: | ||
return ( | ||
CheckResult.PASSED | ||
if conf.get("name") != "KubernetesService" or str(conf["properties"]["pricingTier"]).lower() == "standard" |
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.
Im not sure that this is the right check - conf.get("name") != "KubernetesService"
, the name can be everything..
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 did like the TF check
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
added a new arm policy to ensure that Azure Defender is set to On for Kubernetes
Fixes # (issue)
New/Edited policies (Delete if not relevant)
Description
Include a description of what makes it a violation and any relevant external links.
Fix
How does someone fix the issue in code and/or in runtime?
Checklist: