这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@rotemavni
Copy link
Collaborator

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

Description

In the case where a module reference has [0] (or any other count in its name due to usage of count, Checkov could not find the module reference correctly.
Therefore, I implemented a sanitization mechanism to remove the index from the module name.

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

@rotemavni rotemavni marked this pull request as ready for review May 30, 2025 15:29
@rotemavni rotemavni merged commit d2f72d4 into main May 30, 2025
46 checks passed
@rotemavni rotemavni deleted the tfplan-modules-count branch May 30, 2025 18:16
Saarett pushed a commit that referenced this pull request May 30, 2025
* created sanitization of module calls in terraform plan

* perform sanitization only if root module was not found

* moved test to correct file

* fix test
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.

2 participants