Replies: 2 comments 1 reply
-
Thanks for the detailed report, we will look through it and get back to you. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @cawolf ! Track #6603 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When using trivy for our terraform configuration, we ran into an issue regarding the local terraform cache located in
.terraform
. Trivy 0.50.2 seems to ignore the local cache completely, and instead tries to fetch the modules remotely. In our special case, this leads to a subsequent error (we are using the GitLab terraform registry, which is currently not supported by trivy), which makes trivy not runnable for us.After some debugging, we found that the filesystem used to open the
.terraform/modules/modules.json
file is filtered down to terraform files only (".tf", ".tf.json", ".tfvars"), and thus is not able to open the modules.json file ever. Naively fixing the filepkg/iac/detection/detect.go:247
to also contain the modules.json file fixes the problem locally for us.Desired Behavior
The terraform cache in
.terraform
should be used.Actual Behavior
The terraform cache in
.terraform
is ignored, the debug log outputs:Reproduction Steps
terraform version
terraform init
trivy config .
Operating System
Ubuntu 22.04.4 LTS
Version
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions