Add bypass_settings to a policy drawer
What does this MR do and why?
This merge request adds a new "Policy Bypass Options" feature to the security policy system. The changes allow users to define exceptions where security policies can be bypassed under specific conditions, such as when code is being merged from certain branch patterns to target branches.
The implementation includes:
- A new UI component that displays bypass configurations in an expandable accordion format
- Support for branch-based exceptions that show source and target branch patterns
- The feature integrates into the existing policy details drawer, showing a count of configured bypass options
The bypass settings are stored in the policy's YAML configuration under a new "bypass_settings" section. When exceptions are configured, users can see them listed with clear formatting showing which branch patterns are allowed to bypass the policy requirements. This gives security teams more flexibility in their approval workflows while maintaining visibility into where exceptions are applied.
References
Screenshots or screen recordings
| Description | UI |
|---|---|
| Policy drawer with bypass options | ![]() |
How to set up and validate locally
- Go to Secure -> Polices
- Create new approval policy with advanced options (Policy Exception settings) source branch patterns
- Go to policy list and click on created policy see bypass sections in a drawer
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 #558885 (closed)
