bug(terraform): Trivy does not scan remote modules #5414
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Discussed in #5411
Originally posted by bkonicek-calm October 19, 2023
IDs
avd-gcp-0027
Description
I have a Terragrunt module that calls several custom modules as well as defines individual resources. When I run a
trivy config .
the output isIf I first
terragrunt init
, then it identifies misconfigurations within the downloaded modules from.terraform
. However, it will not identify any misconfigurations from individual resources. I thought this behavior might be caused by Trivy not working properly with Terragrunt. However, when I have Trivy scan my terraform plan output it also does not detect an issue.It appears to be having an issue with the modules sourced from private git repos. If I comment them out, it correctly identifies the individual resource with a misconfiguration, and if I add a module from a public git repo, it also works.
Reproduction Steps
trivy config ./
and see no results.trivy config ./
Target
Filesystem
Scanner
Misconfiguration
Target OS
macOS Ventura
Debug Output
Version
Checklist
-f json
that shows data sources and confirmed that the security advisory in data sources was correctThe text was updated successfully, but these errors were encountered: