checkov
checkov copied to clipboard
feat(arm): AKSUsesAzurePoliciesAddon - Ensure AKS uses Azure Policies Add-on
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
The code defines a check to verify if an Azure Kubernetes Service (AKS) cluster uses the Azure Policies Add-on by inspecting the cluster's properties. If the add-on is enabled, the check passes; otherwise, it fails.
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
Update the logic in the scan_resource_conf method of the AKSUsesAzurePoliciesAddon class to correctly verify the Azure Policies Add-on configuration in the AKS cluster.
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] I have added tests that prove my feature, policy, or fix is effective and works
- [x] New and existing tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules