Skip to content

Add flexible scan execution branch selections

What does this MR do and why?

Add flexible scan execution branch selections

  • add target_protected
  • add target_default
  • add both for projects and groups
  • hide behind feature flag

Changelog: added

EE: true

References

Screenshots or screen recordings

Namespace type w/ ff w/o ff
Project Screenshot_2025-05-12_at_07.52.40 Screenshot_2025-05-12_at_22.12.52
Group Screenshot_2025-05-12_at_15.27.29 Screenshot_2025-05-12_at_22.13.24

How to set up and validate locally

  1. Upload a GitLab Ultimate license
  2. Enable the flexible_scan_execution_policy feature flag in http://gdk.test:3443/rails/features
  3. Navigate to a project => Secure => Policies => New policy => Scan execution policy
  4. Verify a user can select target all protected branches and the branch_type: target_protected yaml is added
  5. Verify a user can select target default branch and the branch_type: target_default yaml is added
  6. Navigate to a project => Secure => Policies => New policy => Scan execution policy
  7. Verify a user can select target all protected branches and the branch_type: target_protected yaml is added
  8. Verify a user can select target all default branches and the branch_type: target_default yaml is added

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #541370 (closed)

Edited by Alexander Turinske

Merge request reports

Loading