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
- Create project
- Create Security Policy Project (by going to Secure -> Policies -> Create new -> MR Approval Policy)
- Create new policy
- Go to Security Policy Project, modify
policy.yml
file and add emptyscan_result_policy: []
to YAML - Go to project, Secure -> Policies. Try to modify policy created in step 2.
- When new MR is created, you can see that
scan_result_policy: []
is removed in the diff.