-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(terraform): panic when for-each
contains an object with different attr types
#5752
Comments
@knqyf263 we'd like to have this in the next patch release (v0.48.1). When would that be? |
We're struggling with the same issue. |
@nikpivkin Simar will be on vacation this week. I think we'll cut v0.48.1 and include this fix in v0.49.0. What do you think? |
Can we release a new version of trivy-iac now? |
Just did https://github.com/aquasecurity/trivy-iac/releases/tag/v0.7.1 |
@nikpivkin Can you please open a PR to bump trivy-iac to v0.7.1? |
@knqyf263 Yeah, I'm on it right now |
Could there be a minor release for trivy-action to include these fixes? |
Not just trivy actions - trivy itself. Could it be updated to 0.49? Currently all pipelines are still failing with [panic ](panic: inconsistent map element types) | cheers |
Fixed in v0.48.1 |
Discussed in #5750
Originally posted by rwunderer December 7, 2023
Description
I have a for_each loop in terraform, calling a module multiple times, with different parameters. One of the parameters is an array of strings that may be empty.
So the first for_each run sets eg
path_writers = ["somestring"]
the second run setspath_writers = []
. This is perfectly valid from both terraform's and the modules point of view.Trivy however gets confused because it seems to build an internal data structure from the first element and expects this parameter to always be a non-empty array. As a result trivy panics.
Desired Behavior
Trivy completes successfully (reporting misconfigurations or not, depending on the code)
Actual Behavior
Trivy aborts with a panic
Reproduction Steps
trivy config .
Operating System
Debian 11 bullseye
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: