Skip to content

Add security report time window to MR approval policy

What does this MR do and why?

With Merge Request Approval Policy Time Window (#525509) we want to add a new option in MR approval policy to set a time window for selecting the target branch comparison pipeline for MR. This will enable comparisons against the latest pipeline with security reports created within a specified time range, rather than always waiting for the most recent baseline run to complete.

This MR adds the field to the policy schema and adds the feature flag. This feature is split into 3 MRs:

References

Screenshots or screen recordings

Screenshot_2025-09-10_at_7.53.56_PM

How to set up and validate locally

  • Enable approval_policy_time_window feature flag
  • Create a MR approval_policy for a group or project with invalid value for security_report_time_window:
policy_tuning:
  security_report_time_window: 10081
  • Verify that the validation fails

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 #525509

Edited by Sashi Kumar Kumaresan

Merge request reports

Loading