-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
checksCheck additions or changesCheck additions or changes
Description
Describe the issue
In version v3.2.473, Checkov only scanned Terraform files that were explicitly imported in main.tf (or by the required resources) using the "source" attribute. However, in the latest version, Checkov is now scanning all Terraform files it finds in the directory, even those that are not directly referenced.
Examples
Let’s say I have the following setup:
- An external package containing default templates for various AWS resources (e.g., S3, API Gateway, DynamoDB, ECS, AppSync, etc.).
- A Terraform app that only needs to create an ECS resource.
- My main.tf looks like this:
module "my_ecs" {
source = "../../path_to_my_external_package/ecs/resource"
...
}
Previously, Checkov would only scan the ECS module specified in main.tf. Now, it also scans unrelated modules like S3, API Gateway, etc., from the external package, even though they are not referenced or required, resulting in unexpected errors.
Version (please complete the following information):
- Checkov Version 3.2.474
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
checksCheck additions or changesCheck additions or changes