Skip to content

Override pushrule for security policy project

Sashi Kumar Kumaresan requested to merge sk/463064-override-push-rule into master

What does this MR do and why?

This change overrides the push rules for a security policy project when it is created for the first time. When the push rules are configured at the group level, the security policy project will be blocked from creating a policy if the default commit message & branch name violate the rule configured at the group level.

MR acceptance checklist

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

Screenshots or screen recordings

Push Rule

Screenshot_2024-08-19_at_3.38.44_PM

MR in security policy project

Screenshot_2024-08-13_at_6.19.28_PM

Commit blocked by push rule

Screenshot_2024-08-19_at_3.23.33_PM

How to set up and validate locally

  • Create a group and create a push rule from Settings -> Repository -> Pre-defined push rules with Require expression in commit messages, Reject expression in commit messages & Branch name
  • Create a security policy from Secure -> Policies and verify that the MR with policy changes is created
  • Create a different project within the same group and create a commit/branch that violates the push rule and verify that it is blocked

Addresses #463064 (closed)

Edited by Sashi Kumar Kumaresan

Merge request reports

Loading