Skip to content

Add actions section to vulnerability management policy editor_component

What does this MR do and why?

Related #465857 (closed)

Add actions section to vulnerability management policy editor_component

This adds the actions section to the editor component of the vulnerability management policy type. Currently, there is only 1 option, namely auto_resolve which renders as the label Resolved. When we work on auto-dismiss feature later on, this label will become a dropdown where you can select Resolved / Dismissed.

Because there's only 1 option at the moment, the default template already contains

actions:
  - type: auto_resolve

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.

Screenshots or screen recordings

Screenshot_2024-07-10_at_11.33.29

invalid actions yaml

Screenshot_2024-07-10_at_11.43.07

How to set up and validate locally

  1. enable feature flag vulnerability_management_policy_type
  2. go to a project
  3. go to Secure > Policies
  4. click New policy
  5. click Select policy on the Vulnerability management policy card
  6. validate it shows a yaml preview with
type: vulnerability_management_policy
name: ''
description: ''
enabled: true
actions:
  - type: auto_resolve
  1. validate that if you change auto_resolve by something else or you remove the actions from the yaml, the actions section will still render but not display the "Resolved" label
Edited by Lorenz van Herwaarden

Merge request reports

Loading