Unable to create scan result policy

Summary

Steps to reproduce

I tried using rule mode to create a policy as shown in the screenshot below. I then got back an error stating Name should be the same as policy name. Note: This is in a development project that has never had a security policy project previously linked to it. I was attempting to take this action as a Project and Group Owner.

I then tried switching into yaml mode and tried again but got this error: Invalid policy YAML property '/scan_result_policy/0/actions/0/group_approvers_ids' is invalid: error_type=minItems

For reference, the yaml I was using was as follows:

type: scan_result_policy
name: Require approval for all critical and high vulnerabilities
description: Require approval for all MRs with criticals and highs
enabled: true
rules:
  - type: scan_finding
    branches:
      - main
    scanners:
      - container_scanning
      - dast
      - dependency_scanning
      - sast
      - secret_detection
      - coverage_fuzzing
      - api_fuzzing
    vulnerabilities_allowed: 0
    severity_levels:
      - critical
      - high
    vulnerability_states:
      - newly_detected
actions:
  - type: require_approval
    approvals_required: 1
    user_approvers_ids:
      - 4627057
      - 5292351
    group_approvers_ids: []

Example Project

https://gitlab.com/gitlab-examples/wayne-enterprises/wayne-financial/customer-web-portal/

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

image

image

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by Sam White