Update from_yaml parser for role_approvers
What does this MR do and why?
Describe in detail what your merge request does and why.
Update from_yaml parser for role_approvers
- add role_approvers as allowed value
- update test
Changelog: added
EE: true
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
NOTE: Because the backend isn't fully implemented, one needs to do a workaround to create this policy
- Upload a GitLab Ultimate license
- Navigate to a policy project =>
/-/blob/main/.gitlab/security-policies/policy.yml
- Modify the policy.yml manually and add the below policy
scan_result_policy:
- name: Require owner or maintainer approvers for all license states policy
description: ''
enabled: false
rules:
- type: license_finding
branches:
- master
match_on_inclusion: false
license_types:
- CNRI Jython License
- CNRI Python License
license_states:
- newly_detected
- detected
actions:
- type: require_approval
approvals_required: 1
role_approvers:
- owner
- maintainer
- Merge and navigate to a project that uses the policy project => Security & Compliance => Policies
- Select the policy
- Verify the drawer loads (though with incorrect text because that part isn't implemented yet)
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 #377863 (closed)