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

fix(terraform): Convert to graph check #6875

Merged
merged 2 commits into from
Dec 3, 2024
Merged

fix(terraform): Convert to graph check #6875

merged 2 commits into from
Dec 3, 2024

Conversation

tsmithv11
Copy link
Collaborator

@tsmithv11 tsmithv11 commented Nov 26, 2024

User description

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

Description

Fixes #6754

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:

Convert the existing AWS Load Balancer protocol check from a resource-based approach to a graph-based approach. This change involves removing the LBTargetGroup class from checkov/terraform/checks/resource/aws/LBTargetGroup.py and introducing a new YAML-based graph check in checkov/terraform/checks/graph_checks/aws/LBTargetGroup.yaml. The new check ensures that AWS Load Balancers do not use the HTTP protocol. Additionally, update the test cases to reflect this change, including the removal of old test files and the addition of new graph-based test cases in tests/terraform/graph/checks/resources/LBTargetGroup/.

TopicDetails
Test Case Update Update test cases to support the new graph-based check for AWS Load Balancer protocol.
Modified files (5)
  • tests/terraform/graph/checks/test_yaml_policies.py
  • tests/terraform/graph/checks/resources/LBTargetGroup/expected.yaml
  • tests/terraform/checks/resource/aws/example_LBTargetGroup/main.tf
  • tests/terraform/checks/resource/aws/test_LBTargetGroup.py
  • tests/terraform/graph/checks/resources/LBTargetGroup/main.tf
Latest Contributors(2)
UserCommitDate
tsmithv11feat-terraform-Add-new...November 27, 2024
bo156fix-terraform-Temporar...July 08, 2024
Graph Check Conversion Convert the AWS Load Balancer protocol check to a graph-based approach.
Modified files (2)
  • checkov/terraform/checks/graph_checks/aws/LBTargetGroup.yaml
  • checkov/terraform/checks/resource/aws/LBTargetGroup.py
Latest Contributors(1)
UserCommitDate
tsmithv11feat-terraform-New-che...September 19, 2024
This pull request is reviewed by Baz. Join @tsmithv11 and the rest of your team on (Baz).

@tsmithv11 tsmithv11 merged commit 3a80c8d into main Dec 3, 2024
38 of 39 checks passed
@tsmithv11 tsmithv11 deleted the fix-aws-378-nov24 branch December 3, 2024 07:33
Saarett pushed a commit that referenced this pull request Dec 3, 2024
Saarett pushed a commit that referenced this pull request Dec 3, 2024
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_378 is triggering for SSL offloading of ECS services
3 participants