Add bypass option widget

What does this MR do and why?

Add bypass option widget

  1. Add policy exceptions section
  2. Add modal for policy exceptions selections
  3. Add tests

This change adds a new "Policy Exception" feature to the security orchestration policy editor. It introduces a modal interface that allows users to define exceptions to security policies based on roles, groups, service accounts/tokens, or source branch patterns. The implementation includes new UI components for selecting different types of exceptions, with a tabbed interface in the modal to switch between them. The feature is behind a feature flag called "security_policies_bypass_options" and only appears in the UI when enabled. While the basic UI structure is complete, the actual functionality of the selectors appears to be placeholder at this stage, as they only render their titles without any interactive elements yet.

References

Screenshots or screen recordings

Description UI
Initial modal for adding exceptions

initial modal.mov

How to set up and validate locally

  1. Enable feature flag:

    Feature.enable(:security_policies_bypass_options)
  2. Secure -> Policies

  3. New merge request approval policy

  4. Open Advanced settings

  5. Click exception button

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

Edited by Artur Fedorov

Merge request reports

Loading