bug(misconf): Incorrect terraform submodules scanning #7113
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Discussed in #7106
Originally posted by ajax-ryzhyi-r July 7, 2024
Description
When there is a submodule call in terraform configuration trivy scans the parent module instead of the submodule. For example, when I have karpenter module call in configuration (
terraform-aws-modules/eks/aws//modules/karpenter
):trivy scans parent eks module instead
terraform-aws-modules/eks/aws
:This issue appeared in the 0.53.0 version everything was ok in 0.52.2
Desired Behavior
Trivy scans submodules code instead of parent module
Actual Behavior
Trivy scans parent module code instead of submodule
Reproduction Steps
1. Create root terraform module with `terraform-aws-modules/eks/aws//modules/karpenter` public module call 2. Run trivy scan
Target
AWS
Scanner
Misconfiguration
Output Format
Table
Mode
Standalone
Debug Output
Operating System
macOS Sonoma
Version
Checklist
trivy clean --all
The text was updated successfully, but these errors were encountered: