bug(misconf) Terraform module: "Failed to load module "improper constraint:" #6537
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Introduced in v0.50.0
Discussed in #6536
Originally posted by du228 April 22, 2024
Description
We are replacing
tfsec
withtrivy
and It seems trivy can't parse terraform module version if "version" has complex expression.For example if the terraform configuration has the code similar to this one
trivy will end up with this in debug log:
and no scan will be performed for this module.
Desired Behavior
In
tfsec
it worked as expected:If we set simple expression instead, trivy will work as expected (change "~> 15.0" to "> 15.0")
Actual Behavior
Failed to load module "improper constraint: ~> 15.0"
Reproduction Steps
Target
Filesystem
Scanner
Misconfiguration
Output Format
None
Mode
Standalone
Debug Output
Operating System
macOS Sonome
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: