Skip to content

Add cli option to specify an image name to filter vulnerabilities

Michael Eddington requested to merge mikeeddington-add-image-option into master

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 to fips
  • Update Vulnerability.fips? to use new options.image argument
  • Update and add new tests
  • Move global variables defined in main.rb into globals.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

Merge request reports