Skip to content
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

platform(terraform): Add eval keys #6929

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

tsmithv11
Copy link
Collaborator

@tsmithv11 tsmithv11 commented Jan 2, 2025

User description

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

Description

Add evaluation_keys for more checks

Also Fixes #6932

Checklist:

  • 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
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes

Generated description

Below is a concise technical summary of the changes proposed in this PR:

Adds evaluation keys to multiple AWS-related Terraform checks. Modifies existing check classes to include evaluated_keys or get_evaluated_keys() methods, which specify the configuration keys that were evaluated during the check. This change improves the granularity and accuracy of the checks by explicitly tracking which parts of the resource configuration were examined.

TopicDetails
Add evaluation keys Adds evaluated_keys or get_evaluated_keys() methods to various AWS resource checks in Terraform
Modified files (25)
  • checkov/terraform/checks/resource/aws/ECSClusterLoggingEncryptedWithCMK.py
  • checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py
  • checkov/terraform/checks/resource/aws/S3GlobalViewACL.py
  • checkov/terraform/checks/resource/aws/ELBwListenerNotTLSSSL.py
  • checkov/terraform/checks/resource/aws/SQSQueueEncryption.py
  • checkov/terraform/checks/resource/aws/BatchJobIsNotPrivileged.py
  • checkov/terraform/checks/resource/aws/ImagebuilderImageRecipeEBSEncrypted.py
  • checkov/terraform/checks/resource/aws/ElasticBeanstalkUseEnhancedHealthChecks.py
  • checkov/terraform/checks/resource/aws/EMRClusterConfEncryptsLocalDisk.py
  • checkov/terraform/checks/data/aws/IAMManagedAdminPolicy.py
  • checkov/terraform/checks/resource/aws/ElasticsearchDomainAuditLogging.py
  • checkov/terraform/checks/resource/aws/ElasticBeanstalkUseManagedUpdates.py
  • checkov/terraform/checks/resource/aws/IAMManagedAdminPolicy.py
  • checkov/terraform/checks/resource/aws/CloudWatchLogGroupRetentionYear.py
  • checkov/terraform/checks/resource/aws/TransferServerAllowsOnlySecureProtocols.py
  • checkov/terraform/checks/resource/aws/CloudfrontDistributionOriginFailover.py
  • checkov/terraform/checks/resource/aws/ECSServiceFargateLatest.py
  • checkov/terraform/checks/resource/aws/WAFRuleHasAnyActions.py
  • checkov/terraform/checks/resource/aws/EMRClusterConfEncryptsInTransit.py
  • checkov/terraform/checks/resource/aws/AWSCodeGuruHasCMK.py
  • checkov/terraform/checks/resource/aws/TransferServerLatestPolicy.py
  • checkov/terraform/checks/resource/aws/MQBrokerVersion.py
  • checkov/terraform/checks/resource/aws/EMRClusterConfEncryptsEBS.py
  • checkov/terraform/checks/resource/aws/AMIEncryption.py
  • checkov/terraform/checks/resource/aws/SecretManagerSecret90days.py
Latest Contributors(2)
UserCommitDate
tsmithv11fix-terraform-Fix-two-...November 26, 2024
tazuri@paloaltonetwork...feat-terraform-Add-che...November 18, 2024
Minor refactoring Performs minor refactoring and type annotation updates in some files
Modified files (1)
  • checkov/terraform/checks/resource/aws/APIGatewayMethodWOAuth.py
Latest Contributors(1)
UserCommitDate
tsmithv11feat-terraform-Add-bui...August 15, 2024
This pull request is reviewed by Baz. Join @tsmithv11 and the rest of your team on (Baz).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CKV_AWS_361 get_evaluated_keys() returns a string instead of list
1 participant