Skip to content

fix(terraform): prevent errors with rule_no for non-int cases - #7628

Open
p0o wants to merge 1 commit into
bridgecrewio:mainfrom
p0o:fix/abs-nacl-sort-mixed-types
Open

fix(terraform): prevent errors with rule_no for non-int cases#7628
p0o wants to merge 1 commit into
bridgecrewio:mainfrom
p0o:fix/abs-nacl-sort-mixed-types

Conversation

@p0o

@p0o p0o commented Jul 28, 2026

Copy link
Copy Markdown

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

Description

Experiencing the same issue that Checkov throws on dynamic NACL blocks with rule_no of non integer (or integer + variable).
The fix is maintiang the sort similar to how it was suggested by the maintainer in the issue, perform relevant checks and uses force_int() to get the rule_no and otherwise, push the dynamic values to the end of the order.

Fixes #5893

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

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.

Internal checkov error on aws_network_acl but exits 0

1 participant