Add scan result policy into policy editor
What does this MR do and why?
Add scan result policy into policy editor similar to scan execution policies.
utils.js
and some constants are moved to the parent directory in order to be shared by both files.
Follow up from !77810 (merged) Related issue: #346072 (closed)
Screenshots or screen recordings
How to set up and validate locally
- It requires an orchestration policy as described in https://docs.gitlab.com/ee/user/application_security/policies/#policies.
- This yaml can be used as an example:
---
scan_result_policy:
- name: critical vulnerability CS approvals
description: critical severity level only for container scanning
enabled: true
rules:
- type: scan_finding
branches:
- master
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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Zamir Martins