-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: take VEX docs into account when --fail-on is set (#1657)
* Take VEX docs into account when --fail-on is set Previously, VEX documents provided to Grype when --fail-on was set were not taken into account. That led to inconsistent behaviour where a vulnerability would be ignored when only `--vex` was specified, but would be included in Grype output when both `--vex` and `--fail-on` were specified. This change fixes that by moving the failure severity check to after the VEX documents provided are tested. I have also added a unit test to check that the combination of VEX docs and failure severity checks works as expected. Signed-off-by: Feroz Salam <[email protected]> * Fix typos Signed-off-by: Feroz Salam <[email protected]> --------- Signed-off-by: Feroz Salam <[email protected]>
- Loading branch information
1 parent
5e1ba46
commit a3ade42
Showing
6 changed files
with
119 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"@context": "https://openvex.dev/ns/v0.2.0", | ||
"@id": "https://openvex.dev/docs/public/vex-d4e9020b6d0d26f131d535e055902dd6ccf3e2088bce3079a8cd3588a4b14c78", | ||
"author": "The OpenVEX Project <[email protected]>", | ||
"timestamp": "2023-07-17T18:28:47.696004345-06:00", | ||
"version": 1, | ||
"statements": [ | ||
{ | ||
"vulnerability": { | ||
"name": "CVE-2014-fake-1" | ||
}, | ||
"products": [ | ||
{ | ||
"@id": "pkg:oci/debian@sha256%3A124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126?repository_url=index.docker.io/library" | ||
} | ||
], | ||
"status": "fixed" | ||
} | ||
] | ||
} |
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