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

feat(terraform): create cross-variable edges between resources from the same module #3881

Merged
merged 10 commits into from
Nov 16, 2022

Conversation

YaaraVerner
Copy link
Contributor

@YaaraVerner YaaraVerner commented Nov 15, 2022

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

Description

Implement part of issue-3886.
Create cross-variable edges for terraform resources that are on the same modules and connected via variables, locals and etc.

Checklist:

  • My code follows the style guidelines of this project
  • 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
  • Any dependent changes have been merged and published in downstream modules

@YaaraVerner YaaraVerner changed the title create multi-hops edges between resources from the same module feat(terraform): create cross-variable edges between resources from the same module Nov 16, 2022
@YaaraVerner YaaraVerner marked this pull request as ready for review November 16, 2022 10:28
checkov/terraform/graph_builder/local_graph.py Outdated Show resolved Hide resolved
Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work, added 2 suggestions

checkov/terraform/graph_builder/local_graph.py Outdated Show resolved Hide resolved
checkov/terraform/graph_builder/local_graph.py Outdated Show resolved Hide resolved
Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰

@YaaraVerner YaaraVerner merged commit a4763ec into master Nov 16, 2022
@YaaraVerner YaaraVerner deleted the add-terraform-cross-variable-edges branch November 16, 2022 12:38
gruebel added a commit to gruebel/checkov that referenced this pull request Nov 16, 2022
…he same module (bridgecrewio#3881)

* create multi-hops edges between resources from the same module

* add UT

* add asserting edges count

* add const

* add UT

* fix

* Update checkov/terraform/graph_builder/local_graph.py

Co-authored-by: naorda <[email protected]>

* Apply suggestions from code review

Co-authored-by: Anton Grübel <[email protected]>

* Update checkov/terraform/graph_builder/local_graph.py

Co-authored-by: Anton Grübel <[email protected]>

* fix lint

Co-authored-by: naorda <[email protected]>
Co-authored-by: Anton Grübel <[email protected]>
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.

3 participants