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.17k stars 1.12k forks source link

feat(terraform): support resource_type attribute - revert #6843

Closed SteveVaknin closed 2 weeks ago

SteveVaknin commented 2 weeks ago

User description

Reverts bridgecrewio/checkov#6830


Generated description

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

Revert changes related to the resource_type attribute in the Terraform module. This involves removing the wrap_reserved_attributes function and its usage across several files, including base_attribute_solver.py, attribute_names.py, and module.py. The test case test_module_with_resource_type_attribute is also removed from test_module.py. These changes restore the previous state before the feature was introduced.

<table><tr><th>Topic</th><th>Details</th><tr><td><a href=https://baz.co/changes/bridgecrewio/checkov/6843?tool=ast&topic=Attribute+Handling>Attribute Handling</a>
    </td><td>Revert the handling of reserved attributes in the <code>BaseAttributeSolver</code> class by removing the <code>wrap_reserved_attributes</code> function and its usage.<details><summary>Modified files (2)</summary><ul><li>checkov/common/graph/graph_builder/graph_components/attribute_names.py</li>
  • checkov/common/checks_infra/solvers/attribute_solvers/base_attribute_solver.py
  • Latest Contributors(2)
    UserCommitDate
    @SteveVakninfeat-terraform-support...November 13, 2024
    @lirshindalmanfeat-general-filter-re...July 25, 2024
    Module Reversion Revert the changes in the Module class related to altering reserved attributes, specifically the resource_type.
    Modified files (1)
    • checkov/terraform/graph_builder/graph_components/module.py
    Latest Contributors(2)
    UserCommitDate
    @SteveVakninfeat-terraform-support...November 13, 2024
    @ChanochShaynerfeat-terraform-Add-pro...May 29, 2024
    Test Case Removal Remove the test case test_module_with_resource_type_attribute that was added to test the resource_type attribute handling.
    Modified files (1)
    • tests/terraform/parser/test_module.py
    Latest Contributors(2)
    UserCommitDate
    @SteveVakninfeat-terraform-support...November 13, 2024
    @bo156feat-terraform-Remove-...August 16, 2023
    This pull request is reviewed by Baz. Join @SteveVaknin and the rest of your team on (Baz).