Skip to content
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 verbose mode for cves for image listing #2307

Closed
wants to merge 1 commit into from

Conversation

vrajashkr
Copy link
Contributor

What type of PR is this?
feature

Which issue does this PR fix:
Towards #2175

What does this PR do / Why do we need it:
This PR introduces a new verbose output for listing CVEs for a given image. In this mode, all the details of the CVE are shown in full including the CVE Description and package related details.

Testing done on this change:
Screenshot from 2024-03-08 22-09-30
Screenshot from 2024-03-08 22-10-53
Screenshot from 2024-03-08 22-17-15

Will this break upgrades or downgrades?
No, there is no expected impact to upgrades or downgrades.

Does this PR introduce any user-facing change?:
Yes

A new --verbose flag is available for users to view complete details about the CVE impacting the image. This includes the full description and a list of packages which are vulnerable to the CVE.
The verbose mode can be invoked with bin/zli-linux-amd64 --config <config> cve list <image name> --verbose

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Signed-off-by: Vishwas Rajashekar <vrajashe@cisco.com>
@vrajashkr
Copy link
Contributor Author

This PR only adds the changes for the verbose mode. I'll create a separate PR for the changes to the non-verbose output.

@rchincha rchincha added this to the v2.0.2 milestone Mar 8, 2024
@rchincha
Copy link
Contributor

rchincha commented Mar 8, 2024

This is zli counterpart to the zui PR project-zot/zui#428?

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.86%. Comparing base (2dd1fc9) to head (396cfca).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2307   +/-   ##
=======================================
  Coverage   92.86%   92.86%           
=======================================
  Files         166      166           
  Lines       21994    22023   +29     
=======================================
+ Hits        20424    20451   +27     
- Misses        977      979    +2     
  Partials      593      593           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vrajashkr
Copy link
Contributor Author

This is zli counterpart to the zui PR project-zot/zui#428?

It's slightly different as, per my understanding, zli never had a package listing at all before.

zui already had a package listing, but was missing the new PackagePath field.

@rchincha
Copy link
Contributor

rchincha commented Mar 9, 2024

@vrajashkr there are linter failures.

@vrajashkr
Copy link
Contributor Author

Yes, taking a look at it. Will update the PR once I get a chance.

@vrajashkr vrajashkr closed this Mar 11, 2024
@vrajashkr vrajashkr deleted the feat/pkg-path-zli branch March 11, 2024 13:54
@vrajashkr
Copy link
Contributor Author

Branch was deleted due to an issue with pushing the updated. A fresh branch was created with the same changes and the lint issues resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants