Skip to content

Update from_yaml parser to include new fields

Alexander Turinske requested to merge 390111-update-from-yaml-parser into master

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_drawer_-_b policy_drawer_-_a
Policy Editor - edit policy_editor_-_b policy_editor_-_a

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Upload a GitLab Ultimate license
  2. Turn on the license_scanning_policies feature flag (echo "Feature.enable(:license_scanning_policies)" | rails c
  3. 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
  1. 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)
  2. 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.

Related to #390111 (closed)

Edited by Alexander Turinske

Merge request reports

Loading