Update from_yaml parser to include new fields
What does this MR do and why?
Describe in detail what your merge request does and why.
Update from_yaml parser to include new fields
- with the addition of license scanning policy new fields are allowed and need to be parsed
- while this is for a feature that is behind a feature flag, this does not need to be behind a feature flag
Changelog: changed
EE: true
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Page | Before | After |
---|---|---|
Policy Drawer | ||
Policy Editor - edit |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Turn on the
license_scanning_policies
feature flag (echo "Feature.enable(:license_scanning_policies)" | rails c
- Navigate to http://gdk.test:3443/flightjs/Flight/-/security/policies/new and create the below policy and save it
type: scan_result_policy
name: Require approvers for license policy changes
description: ''
enabled: true
actions:
- type: require_approval
approvals_required: 1
user_approvers_ids:
- 1688069
rules:
- type: license_finding
branches: []
match_on_inclusion: true
license_types:
- MIT License
license_states:
- detected
- Navigate to http://gdk.test:3443/flightjs/Flight/-/security/policies, select the policy and verify the drawer loads (the summary is still incorrect, but that will be fixed in a follow-up MR)
- Edit the policy and verify the policy editor loads (not everything will be correct, but that will come in a follow-up MR)
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 #390111 (closed)
Edited by Alexander Turinske