Add error handling for parsing yaml strings in sep
What does this MR do and why?
Describe in detail what your merge request does and why.
This MR resolves 393858
When a user is creating a scan execution policy (SEP) in yaml mode with invalid yaml content, rule mode should be disabled
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Error handling |
|---|
| invalid_yaml |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload an GitLab Ultimate license
- Navigate to
/security/policies/new?type=scan_execution_policy - Navigate to yaml mode
- Paste in the below policy, which has valid cron syntax or any invalid yaml
type: scan_execution_policy
name: Test
description: ''
enabled: true
rules:
- type: schedule
branches: []
cadence: */5 0 * * *
actions:
- scan: dast
site_profile: ''
scanner_profile: ''
tags: []
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 #393858 (closed)
Edited by Artur Fedorov