Skip to content

Sync approvals required after syncing rules

What does this MR do and why?

Currently approval rules are synced against the head pipeline in two occasions:

With !92010 (merged) approval rules are refreshed thus there is a need to reuse the same sync job mentioned above.

TLDR; This MR adds a call to the existing sync report approvals worker just after the approval rules have been refreshed from the policy project.

How to set up and validate locally

  1. Create a new project
  2. Push a new branch and open a merge request with the following:
include:
  - template: Security/Container-Scanning.gitlab-ci.yml
variables:
  DOCKER_IMAGE: python:3.4-alpine
  1. Expectation: After the pipeline has been completed approval rule will NOT be present.
  2. Navigate to Security & Compliance > Policies, click New Policy
  3. Create a new Scan result policy with:
    1. scanners only set to SAST.
    2. set the approver to anyone other than the MR author.
  4. Expectation: After the async job has been run the merge request will display the approval rule but approval will NOT be required.

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