Add regex patterns in rules section of Security Policies

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Currently, in Security Policies "Conditions" section, to apply exceptions, users can add branches from their projects likewise branch-name@group-name/project-name

However, some customers might needs to add main branch of large number of their projects (they may or may not be protected or default) to the exceptions list, adding them one by one isn't quite feasible.

Proposal

Add the possibility to apply regex-type of exceptions in the rules, which might increase rules flexibility.

  rules:
    - type: pipeline
      branches:
      - "!^main$"

Related issue #509066

Edited Aug 26, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading