-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add report summary table #8177
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: knqyf263 <[email protected]>
@DmitriyLewen @nikpivkin Before further development, I'd like to hear your thoughts. |
I agree with you. I think we need to discuss this. Initially (I may be wrong) Trivy was crippled by aggregating individual packages to avoid having too many tables in a report.
It seems that having multiple types for a single file is rare, so I suggest using this logic and waiting for feedback from users.
I prefer this way. I also have one idea - some users don't need to see vulnerability/misconfiguration numbers (CVE etc). So we can hide other tables by default and show them only when using a new flag ( As a future update:
|
I like the idea, the summary table looks good. Should the results be sorted by file name or scan type? I noticed that terraform scan results contain directories that we should get rid of. |
Exactly. It will simplify our logic. However, it will probably break something. We should carefully announce it. That's why I didn't want to add the change into this PR.
I already implemented it in this PR unless I'm making a mistake. In the screenshot, |
The current summary table is ordered by scanners, vulnerabilities -> misconfigurations -> secrets -> licenses. Do you want to sort by sub-scanners, such as terraform?
Yes, I actually saw |
Great! |
Looks nice. What's the difference between a I think I understand it as
I think we should change k8s summary output to be more simpler rather than the other way around. To me the k8s summary output is a bit too much especially with so many numbers that it isn't very helpful. |
This PR introduces a summary table that displays all scan results, including those with zero findings, such as vulnerabilities and misconfiguration, to improve visibility and reduce user anxiety about the scanning process.
Background
Historically, Trivy followed the Unix philosophy where "silence is golden" and didn't output anything when no vulnerabilities were found. However, this led to user confusion about whether scans were working correctly. While we previously addressed this by showing results for OS packages with zero vulnerabilities, the inconsistency between OS and language-specific package outputs has created new confusion.
Proposed Changes
This PR adds a summary table at the beginning of the output that:
Example output:
Considerations
Aggregated Results for Individual Files
Result Aggregation Strategy
Default Behavior
--no-summary-table
)--show-summary-table
Implementation Notes
TODOs
--no-summary-table
Related issues
Checklist