Replies: 2 comments 3 replies
-
this feels similar to #7098 since |
Beta Was this translation helpful? Give feedback.
3 replies
-
Track #7222 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Consider this terraform file and terraform vars file:
s3.tf:
vars.tf
I ran these command one by one:
trivy config --tf-vars vars.tfvars --misconfig-scanners "terraform" s3.tf
Not any issues. (Because condition count validated to false)
Then I used this command to generate terraform plan as a snapshot
terraform plan --var-file vars.tfvars --out tfplan
Then I ran trivy command against terraform snapshot:
trivy config --misconfig-scanners "terraformplan-snapshot" tfplan
3 open issues.
Then I ran trivy command against terraform snapshot but this time with tfvars file.
trivy config --tf-vars vars.tfvars --misconfig-scanners "terraformplan-snapshot" tfplan
No open issues this time.
Important thing is I can run terraform apply command against tfplan without passing tfvars file and it is working as excepted But it is not the case with trivy.
terraform apply tfplan
Desired Behavior
There should not be any open issues.
Actual Behavior
Inconsistent in the issue count between terraform and terraformplan-snapshot scanner
Reproduction Steps
Reproduction steps are in the descriptions.
Target
Filesystem
Scanner
Misconfiguration
Output Format
None
Mode
Standalone
Debug Output
Operating System
Ubuntu 20.04
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions