Skip to content

Conversation

@srivamsia
Copy link

Summary

Adds native support for scanning OpenTofu configuration files using the
.tofu and .tofu.json extensions.

Motivation

OpenTofu is a community-driven fork of Terraform that commonly uses the
.tofu file extension. At present, Checkov does not detect these files,
which prevents users from scanning OpenTofu-based IaC projects.

Changes

  • Extend Terraform file discovery to include .tofu and .tofu.json
  • Update parser and runner logic to treat .tofu files equivalently to .tf
  • Add unit tests to validate parsing and scanning behavior for .tofu files

Testing

  • Added new unit tests under tests/terraform
  • Verified that Checkov detects and parses resources defined in .tofu files

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.

1 participant