-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Override with Vendor score if exists (#433)
* wip: Add a failing test to demo severity override Signed-off-by: Simarpreet Singh <[email protected]> * scan.go: Return osFound for use in determining vendor. Signed-off-by: Simarpreet Singh <[email protected]> * pkg: Fix ScanImage return in case an OSFound Signed-off-by: Simarpreet Singh <[email protected]> * scan_test: Include a package-lock.json for happy path Signed-off-by: Simarpreet Singh <[email protected]> * wip: Add a test to include various reportResult types Signed-off-by: Simarpreet Singh <[email protected]> * Makefile: Add a target to generate mocks. Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability: Pass reportType as argument for FillInfo. Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability: Add other types of vulnerabilities. Signed-off-by: Simarpreet Singh <[email protected]> * integration: Update golden files. Signed-off-by: Simarpreet Singh <[email protected]> * ospkg: Fix FillInfo for ospkg/server Signed-off-by: Simarpreet Singh <[email protected]> * rpc: Add os.Family type to Response. Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability_test.go: Add case where no vendor severity exists. Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability: Fallback to NVD if it exists. Also add tests for other cases. Signed-off-by: Simarpreet Singh <[email protected]> * rpc: Fix a few sites with reportType info and tests. Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability: Remove VendorSeverity from displayed results Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability: Add vulnerability source information. Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability: Add VendorSeverity logic for lightDB as well. This commit also makes FillInfo logic common to both light and full DBs. Signed-off-by: Simarpreet Singh <[email protected]> * remove some crufty TODOs Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability_test: Add a case for light db for documentation purposes Signed-off-by: Simarpreet Singh <[email protected]> * mod: update trivy-db to point to master Signed-off-by: Simarpreet Singh <[email protected]> * scan_test: Remove cruft and bring back test cases Signed-off-by: Simarpreet Singh <[email protected]> * scan_test: Add pkg Type to mock return Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability: reorder err check after err Signed-off-by: Simarpreet Singh <[email protected]> * client_test: Fix import ordering Signed-off-by: Simarpreet Singh <[email protected]> * convert.go: Use result.Type Signed-off-by: Simarpreet Singh <[email protected]> * convert: Use result.Type and simplify ConvertFromRpcResults signature Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability: Refactor calls to getVendorSeverity Signed-off-by: Simarpreet Singh <[email protected]> * integration: Remove centos-7-critical.json.golden There's no critical vulnerability in CentOS 7 anymore. In addition this test was not adding any value that is already not covered by existing tests cases. Signed-off-by: Simarpreet Singh <[email protected]> * rpc: Include severity source in tests. Signed-off-by: Simarpreet Singh <[email protected]> * integration: Update test db to include VendorSeverity. Test DB is now a snapshot of full database from trivy-db. Also update golden files to include SeveritySource. Signed-off-by: Simarpreet Singh <[email protected]> * vulnerability: Make centos7 use RHEL vendor severities Signed-off-by: Simarpreet Singh <[email protected]>
- Loading branch information
Showing
60 changed files
with
27,926 additions
and
12,876 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
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
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
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
Oops, something went wrong.