bug(misconf): Inconsistent in the issue count between terraform/terraformplan-snapshot and terraformplan-json scanner #7098
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Discussed in #7096
Originally posted by cybersa July 4, 2024
Description
Consider this terraform script:
If I run these trivy commands against above terraform script, no High or Critical issues.
trivy config --misconfig-scanners terraform -s HIGH,CRITICAL s3_buckets.tf
terraform plan --out tfplan
trivy config --misconfig-scanners terraformplan-snapshot -s HIGH,CRITICAL tfplan
If I run this trivy commands against terraform JSON plan, 12 High issues.
trivy config --misconfig-scanners terraformplan-json -s "HIGH,CRITICAL" tfplan.json
Desired Behavior
Issue should be consistent between terraform, terraformplan-snapshot and terraformplan-json scanner.
Actual Behavior
Inconsistent in the issue between terraform scanners.
Reproduction Steps
Reproduction steps are in the description.
Target
Filesystem
Scanner
Misconfiguration
Output Format
None
Mode
Standalone
Debug Output
Operating System
Ubuntu 20.04
Version
Checklist
trivy clean --all
The text was updated successfully, but these errors were encountered: