bug(misconf): YAML and JSON inputs of same file yield different output formats from Trivy #6485
Closed
2 tasks done
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Discussed in #6289
Originally posted by huornlmj March 8, 2024
Description
If I supply a K8s manifest in YAML format for misconfiguration scanning, Trivy will return findings which include line excerpts from the scanned manifest. For example:
However if I convert the exact same K8s manifest from YAML to JSON and scan the JSON version with Trivy, Trivy finds the same issues but yields a report that omits the line excerpts.
Desired Behavior
Give the user the option to either include or omit line excerpts. The difference in how Trivy operates depending on YAML or JSON input helped show me that I actually prefer the results when they come from JSON, as I think the line excerpts are unnecessary clutter and I would actually like to control whether I see the excerpts or not.
Actual Behavior
Described above
Reproduction Steps
Target
Kubernetes
Scanner
Misconfiguration
Output Format
Table
Mode
Standalone
Debug Output
Operating System
Linux
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: