Skip to content

Disable rule mode when vulnerabilities_allowed is invalid

What does this MR do and why?

Follow up of !118902 (merged).

This MR disables rule mode when vulnerabilities_allowed from YAML is invalid.

Screenshots or screen recordings

invalid_vulnerabilities_allowed

How to set up and validate locally

  1. Ensure the GitLab Ultimate license is enabled
  2. Navigate to a project/group => Security & Compliance => Policies => New policy => Scan result policy
  3. Add security scan
  4. Navigate to yaml mode, make changes to the range/number to a value that does not exist, navigate to rule mode and ensure that rule mode is disabled
  5. Navigate to yaml mode, make changes to the range/number to a value that does exist, navigate to rule mode and ensure the dropdowns have been updated
  6. Create a new policy, edit it and ensure the rule mode is enabled

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 #396992 (closed)

Merge request reports

Loading