bug(misconf): Hang on recursive terraform module #5121
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Discussed in #5086
Originally posted by sebastianblunt September 1, 2023
Description
trivy seems to hang on recursive terraform modules, even exceeding
--timeout
.It also seems to happen if you have a module that references a child module such that the reference to the child module is the same as the path to the outer module relative to where trivy is run from AND the inner child module is missing. This can be reproduced with reproduction steps (2).
Desired Behavior
trivy to exit.
Actual Behavior
trivy hangs indefinitely.
Reproduction Steps
Run
trivy config .
OR
(2) A file named
foo/foo.tf
with contentsand no other files. Run
trivy config .
from the outer directory.Operating System
Linux
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: