Add cli option to specify an image name to filter vulnerabilities
What does this MR do?
The security triage automation matches vulnerabilities location image name to filter out unwanted vulnerability reports. This MR changes how vulnerabilities are filtered by allowing a user to provide a full image name to match on, or a suffix. This provides greater control over which vulnerabilities are processed.
NOTE: This is could be a breaking change for some people. By default images with ubi
in them are not automatically included.
The refactoring of main.rb
was needed to write the tests.
- Add a new command line option
--image
defaulting tofips
- Update
Vulnerability.fips?
to use newoptions.image
argument - Update and add new tests
- Move global variables defined in
main.rb
intoglobals.rb
so they can be used by other classes - Move options defaults into
defaults.rb
so they can be used in tests
What are the relevant issue numbers?
Edited by Michael Eddington