Skip to content

Validate vulnerability_age for required keys

What does this MR do and why?

This MR adds validation for required keys of vulnerability_age in the security orchestration policy JSON schema. It also disallows any additional properties for the object.

Screenshots or screen recordings

image

CleanShot_2023-07-28_at_14.09.00_2x

How to set up and validate locally

  1. Go to Policies and create new scan result policy
  2. Add criteria -> Status -> Previously existing and select any of the statuses
  3. Add criteria -> Age -> Greater than or Less than
  4. Switch to .yaml mode and try to remove any of the required keys, or add a different one
  5. An validation error should be displayed

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #399116 (closed)

Merge request reports

Loading