feat(misconf): Support additional terraform attributes #5460
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
scan/misconfiguration
Issues relating to misconfiguration scanning
Action items
count
,tags
andtype
Discussed in #5444
Originally posted by rickythain October 25, 2023
Question
I tried to create a custom policy that checks if an aws ec2 volume has a count of 1. Upon running the check, the policy did not report it when an aws ec2 volume was created with a count of 1.
So, I checked for any mistakes in the policy file, mistakes on the command used but to no avail. Then, I try to check the input received via the custom policy and found that that may be the issue?
The input received via the custom policy does not contain the complete attributes of the resource (no count, tags, type, size, etc)
I've compiled the terraform, policy, and the extracted-input files in this repo - test-trivy-tf.
Following are the content:
main.tf
policy.rego
Command used to run:
I extracted the input from policy evaluation into the following:
I would appreciate if you could point out what i'm missing or if this is a limitation from trivy? 🙏
Target
None
Scanner
Misconfiguration
Output Format
None
Mode
Standalone
Operating System
Ubuntu 22.04.3 LTS
Version
The text was updated successfully, but these errors were encountered: