bridgecrewio / checkov

Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew.
https://www.checkov.io/
Apache License 2.0
7.02k stars 1.1k forks source link

feat(arm): AKSEncryptionAtHostEnabled #6493

Closed shoshiGit closed 2 months ago

shoshiGit commented 3 months ago

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

[//]: # "

PR Title

Be aware that we use the title to create changelog automatically and therefore only allow specific prefixes
- break:    to indicate a breaking change, this supersedes any of the types
- feat:     to indicate new features or checks
- fix:      to indicate a bugfix or handling of edge cases of existing checks
- docs:     to indicate an update to our documentation
- chore:    to indicate adjustments to workflow files or dependency updates
- platform: to indicate a change needed for the platform
Additionally a scope is needs to be added to the prefix, which indicates the targeted framework, in doubt choose 'general'.
#    
Allowed prefixs:
ansible|argo|arm|azure|bicep|bitbucket|circleci|cloudformation|dockerfile|github|gha|gitlab|helm|kubernetes|kustomize|openapi|sast|sca|secrets|serverless|terraform|general|graph|terraform_plan|terraform_json
#
ex.
feat(terraform): add CKV_AWS_123 to ensure that VPC Endpoint Service is configured for Manual Acceptance

"

Description

We converted the check 'AKSEncryptionAtHostEnabled' from TERRAFORM language to the ARM language so that it also works on resources that are defined in the ARM language.

Fixes # (issue)

Description

Ensure that the AKS cluster encrypt temp disks, caches, and data flows between Compute and Storage resources

Fix

To fix the issue, ensure that the 'enableEncryptionAtHost' property is set to true for both Microsoft.ContainerService/managedClusters and Microsoft.ContainerService/managedClusters/agentPools resources. This enables encryption at host for the VM host of AKS agent nodes, ensuring data stored on the VM host is encrypted at rest and flows encrypted to the Storage service.

Checklist: