fix(misconf): Improve filtering of terraform JSON #7393
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Currently we detect by content but later on filter by name. We shouldn't double filter if the content is already valid.
Discussed in #7363
Originally posted by Molaire August 20, 2024
Description
Hello I planned a dummy terraform project using our boilerplate, turned it in a json and trivy does not seem to be able to scan it. I have no problem with Regula and Checkov.
I'm wondering what part of the plan is tripping up Trivy.
It shows no successful check using
--include-non-failures
, so it seems it's simply not able to scan it.pastebin of json plan: https://pastebin.com/zjb0xgti
Desired Behavior
It should trigger the IMDSv2 check
Actual Behavior
It scans no resource at all
Reproduction Steps
1. Use shared plan 2. Run `trivy conf ./tf_plan.json --include-non-failures -v` 3. Be sad ...
Target
None
Scanner
None
Output Format
None
Mode
None
Debug Output
Operating System
Ubuntu Jammy
Version
Checklist
trivy clean --all
The text was updated successfully, but these errors were encountered: