feat: Support multiple instances of same terraform resource #4627
Labels
kind/bug
Categorizes issue or PR as related to a bug.
kind/feature
Categorizes issue or PR as related to a new feature.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Discussed in #4317
Originally posted by ohad83 December 21, 2022
Description
I'm not exactly sure what's the root problem here, but it seems to be a problem with trivy/defsec/tfsec when I use a module twice and it has a dynamic block which is different for each instance. It might be connected to this issue.
This is a minimal example:
I have 2 buckets, each encrypted with its own key.
What did you expect to happen?
I expect trivy checks about S3 bucket encryption to pass as the buckets are encrypted.
What happened instead?
trivy says the S3 bucket isn't encrypted - only the first bucket.
This has something to do with the fact there are 2 keys and 2 buckets. If I use
key2
for both of them, trivy is happy. If I usekey1
for both, they're both labeled as unencrypted.Output of run with
-debug
:I also ran
defsec
, which has a better debug output for this I believe:Output of
trivy -v
:The text was updated successfully, but these errors were encountered: