Replies: 5 comments
-
I am getting the same problem, even if there is no relevant file in the parent folder:
Gives me:
Trivy finds something in
Trivy finds way more. But for some reason also directories and the main.tf in them. However, there are 29 folders under This is with the latest trivy:
|
Beta Was this translation helpful? Give feedback.
-
When running on |
Beta Was this translation helpful? Give feedback.
-
I am having a similar issue on my CI runner, the |
Beta Was this translation helpful? Give feedback.
-
I'm also running into this today, and realizing that we've been missing a bunch of Trivy-based scanning coverage. This situation is really misleading, as Trivy is detecting some Terraform files, but seemingly silently ignoring others. After spending a bunch of time with Trivy, when asked to scan a directory for misconfigurations should (either by default or with a CLI option) actually recursively scan all of the Terraform Root Modules in the directory. I am locally working around this by adding the |
Beta Was this translation helpful? Give feedback.
-
Opened an issue to track this #4463 |
Beta Was this translation helpful? Give feedback.
-
Description
The trivy config scanner did not pick up .tf files which were a directory below another .tf file.
PoC files
https://github.com/chejn/trivy-bug-example
What did you expect to happen?
The scanner to pick up all files regardless of directory depth.
What happened instead?
The scanner did not identify any .tf files at all.
Output of run with
-debug
:Output of
trivy -v
:Beta Was this translation helpful? Give feedback.
All reactions