Skip to content

Remove empty key with deprecated scan result policies

What does this MR do and why?

This MR removes the empty scan_result_policies key from policy.yml when the policy is modified with GraphQL API.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Create project
  2. Create Security Policy Project (by going to Secure -> Policies -> Create new -> MR Approval Policy)
  3. Create new policy
  4. Go to Security Policy Project, modify policy.yml file and add empty scan_result_policy: [] to YAML
  5. Go to project, Secure -> Policies. Try to modify policy created in step 2.
  6. When new MR is created, you can see that scan_result_policy: [] is removed in the diff.

Merge request reports

Loading