Fix issue with multiple rules with the same values
What does this MR do and why?
Fix issue with multiple rules with the same values
- in an attempt to prevent duplicate values in a single rule, an issue was introduced that prevented duplicates across multiple rules
Changelog: fixed
EE: true
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
allow_duplicates_-_before | allow_duplicates_-_after |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Navigate to a project/group => Secure => Policies => New policy => Scan Result Policy => Yaml mode => Copy/paste the below yaml in
yaml
type: scan_result_policy
name: Same rules
description: ''
enabled: true
rules:
- type: scan_finding
scanners:
- dependency_scanning
vulnerabilities_allowed: 0
severity_levels:
- high
vulnerability_states:
- detected
- confirmed
- dismissed
- resolved
branch_type: default
vulnerability_age:
operator: greater_than
value: 30
interval: day
vulnerability_attributes:
fix_available: false
false_positive: false
- type: scan_finding
scanners:
- dependency_scanning
vulnerabilities_allowed: 0
severity_levels:
- high
vulnerability_states:
- detected
- confirmed
- dismissed
- resolved
branch_type: default
vulnerability_age:
operator: greater_than
value: 30
interval: day
vulnerability_attributes:
fix_available: false
false_positive: false
actions:
- type: require_approval
approvals_required: 1
role_approvers:
- developer
- maintainer
- owner
- Navigate to rule mode
- Verify rule mode is not disabled
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.
Related to #424960 (closed)
Edited by Alexander Turinske