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

fix: halt if pdf selected but unavailable #4354

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Conversation

terriko
Copy link
Contributor

@terriko terriko commented Aug 15, 2024

If pdf output is selected but isn't available, then cve-bin-tool tells you to install reportlab, but it was easy to miss that message as the scan continued and pushed it off the screen. This changes those messages to be errors insead of info messages, and exits without doing a scan if pdf is the only output mode selected.

* Related to intel#4326

If pdf output is selected but isn't available, then cve-bin-tool
tells you to install reportlab, but it was easy to miss that message as
the scan continued and pushed it off the screen.  This changes those
messages to be errors insead of info messages, and exits without doing a
scan if pdf is the only output mode selected.

Signed-off-by: Terri Oda <terri.oda@intel.com>
Signed-off-by: Terri Oda <terri.oda@intel.com>
@terriko terriko added this to the 3.4 milestone Aug 16, 2024
@terriko terriko requested review from inosmeet, anthonyharrison and nedsouza and removed request for anthonyharrison and nedsouza August 20, 2024 17:38
cve_bin_tool/cli.py Show resolved Hide resolved
@mastersans
Copy link
Member

looks good : )

@terriko terriko requested a review from nedsouza August 20, 2024 18:24
@terriko terriko merged commit 628a8a6 into intel:main Aug 20, 2024
21 checks passed
terriko added a commit to terriko/cve-bin-tool that referenced this pull request Aug 20, 2024
Adds a regression test for 0-cve pdf report behaviour.  This should help
us avoid bugs that cause the report to fail in the case where 0 cves
were found.

This is the last piece needed to close intel#4326.  Other pieces:

* intel#4329 fixed the check that was causing report generaiton to fail.
* intel#4354 changed the UI so it's more obvious when reportlab is needed.

* fixes intel#4326

Signed-off-by: Terri Oda <terri.oda@intel.com>
terriko added a commit that referenced this pull request Aug 21, 2024
Adds a regression test for 0-cve pdf report behaviour.  This should help
us avoid bugs that cause the report to fail in the case where 0 cves
were found.

This is the last piece needed to close #4326.  Other pieces:

* #4329 fixed the check that was causing report generaiton to fail.
* #4354 changed the UI so it's more obvious when reportlab is needed.

* fixes #4326

Signed-off-by: Terri Oda <terri.oda@intel.com>
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.

3 participants