Skip to content

Create CI variable filter for scan execution policies

Alexander Turinske requested to merge 412790-add-ci-filters into master

What does this MR do and why?

Create CI var filter for scan execution policies

  • add CI variable filter in rule mode
  • allow multiple variables
  • disable rule mode for custom variables
  • add variable check for empty key disable add button for when there is an empty variable and add tooltip
  • save tags between scan type change
  • remove variables between scan type change
  • update css
  • update tests

Changelog: added

EE: true

What does this MR not do and why?

What does this MR not do and why?

  • a user is not allowed to input a custom variable in rule mode; that will come in a follow-up

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Page Before After
Various - 1 2 3 image
Scan Execution Policy Editor dast_variables_-_b Screen_Recording_2023-06-27_at_19.21.10
Save tags between scan type change tags_-_b tags_-_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. Navigate to a project/group => Secure => Policies => New policy => Scan execution policy
  3. Verify a user can add CI variables in rule mode, modify them in yaml mode and have them reflected in rule mode, etcetera
  4. Save the policy with variables
  5. Navigate to a project/group => Secure => Policies => Edit policy
  6. Verify the editor populates the variables and are editable

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 #412790 (closed)

Edited by Alexander Turinske

Merge request reports