You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the --fail-on flag doesn't appear to take into account the contents of a VEX document that has been provided using the --vex flag - even if several CVEs have been marked as not_affected in the VEX document, the command still fails when the --fail-on flag is set.
This is inconsistent with the behaviour shown when a .grype.yaml file is used with an ignore block defined, despite VEX documents and the ignore block having similar purposes.
What you expected to happen:
If Grype is invoked with both --vex and --fail-on set, and all CVEs in the scanned image are defined as not_affected in the VEX document, I would expect the command to pass successfully, as it does when all such CVEs are defined in a .grype.yamlignore block.
How to reproduce it (as minimally and precisely as possible):
Create the following VEX doc and save it as test-vex.json:
Hey @tgerla if the team agrees that this is a bug and that the correct behaviour should be as described in 'What you expected to happen', then I'm happy to take a look at fixing this myself.
Hi @ferozsalam, that would be excellent. Yes, we agree that this is a bug and your described behavior is probably the right approach. If you need any guidance or anything, just let us know here or in our community Slack and we can help you out. Thanks much!
What happened:
Using the
--fail-on
flag doesn't appear to take into account the contents of a VEX document that has been provided using the--vex
flag - even if several CVEs have been marked asnot_affected
in the VEX document, the command still fails when the--fail-on
flag is set.This is inconsistent with the behaviour shown when a
.grype.yaml
file is used with anignore
block defined, despite VEX documents and theignore
block having similar purposes.What you expected to happen:
If Grype is invoked with both
--vex
and--fail-on
set, and all CVEs in the scanned image are defined asnot_affected
in the VEX document, I would expect the command to pass successfully, as it does when all such CVEs are defined in a.grype.yaml
ignore
block.How to reproduce it (as minimally and precisely as possible):
Create the following VEX doc and save it as
test-vex.json
:Using the
--vex
flag with the JSON file above to filter out the CVEs works as expected:However, if you set the
--fail-on
flag, the--vex
flag is ignored and the vulnerabilities reappear.However, if a
.grype.yaml
is created with the same CVEs listed in anignore
block, those CVEs are ignored. Create a.grype.yaml
with the following:And then invoke Grype with
--fail-on
set:cc @puerco
Environment:
grype version
:cat /etc/os-release
or similar):MacOS Ventura 13.6.3
The text was updated successfully, but these errors were encountered: