-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extensions: cve-bin-tool: Print error and result
The cve-bin-tool script errors out if it finds any CVEs and pipes the error to stderr which tern will catch and report dutifully. However, erroring out due to found CVEs is an expected behaviour for a tool used in an CI/CD pipeline to alert developers. This commit brings in the following changes: - Add a new convenience function in passthrough.py to just store the error message and the result separated by two newline characters. - Decode error and result messages to utf-8 so it gets printed to stdout neatly. - Modify the cve-bin-tool executor to call the execute_and_pass function for each layer in the image object and store the result and error in the analyzed_output property to be subsequently printed. Resolves #689 Signed-off-by: Nisha K <nishak@vmware.com>
- Loading branch information
Showing
2 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters