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
How to set up and validate locally
- Go to Policies and create new scan result policy
- Add criteria -> Status -> Previously existing and select any of the statuses
- Add criteria -> Age -> Greater than or Less than
- Switch to
.yaml mode
and try to remove any of the required keys, or add a different one - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #399116 (closed)