Skip to content

Add text for all branches

What does this MR do and why?

Currently approval project rules consider all protected branches if none is provided. This change reflect this behaviour in the UI for scan result policies.

Related to the work being done in #351166 (closed)

Screenshots or screen recordings

Screen_Shot_2022-01-27_at_2.24.18_PM

How to set up and validate locally

  1. Enable scan_result_policy feature flag
  2. Go to Security Compliance -> Policies
  3. Create a new scan result policy with the following yaml:
scan_result_policy:
- name: critical vulnerability CS approvals
  description: critical severity level only for container scanning
  enabled: true
  rules:
  - type: scan_finding
    branches: []
    scanners:
    - container_scanning
    vulnerabilities_allowed: 1
    severity_levels:
    - critical
    vulnerability_states:
    - newly_detected
  actions:
  - type: require_approval
    approvals_required: 1
    user_approvers:
    - o.lecia.conner

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Zamir Martins

Merge request reports