Return pretty error validation messages for Security Policy
What does this MR do and why?
We're adding this MR to provide additional information to users whenever they provide invalid YAML.
Screenshots or screen recordings
Before
After
How to set up and validate locally
- Create new project
- Go to Security & Compliance -> Policies
- Click on Click new and click on New Policy
- Select
Scan Execution
as Policy type and paste this YAML:
type: scan_execution_policy
name: 'Test'
description: 1234567
enabled: true
rules:
- type: pipeline
branches: main
actions:
- scan: cosmos_scan
site_profile: ''
scanner_profile: ''
- Click on Create via Merge Request and verify errors
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 #341418 (closed)
Edited by Alan (Maciej) Paruszewski