Scan Execution yaml policy validation doesn't work for copy/paste of yaml into editor
Summary
When a user copy/pastes in yaml, the validation doesn't pick up the name has changed
Steps to reproduce
- Navigate to a project => Security & Compliance => Policies => New Policy => Scan execution => yaml mode (http://gdk.test:3443/flightjs/Flight/-/security/policies/new?type=scan_execution_policy)
- Copy/paste the below policy into the policy editor
type: scan_execution_policy
name: Enforce DAST in every release pipeline
description: This policy enforces pipeline configuration to have a job with DAST scan
for release branches
enabled: false
actions:
- scan: dast
scanner_profile: Scanner Profile A
site_profile: Site Profile B
rules:
- type: pipeline
branches:
- release/*
Example Project
TBD
What is the current bug behavior?
The policy validator says the name cannot be less than one character long even though the name is Enforce CIS
What is the expected correct behavior?
The policy validator updates to catch any new issues
Relevant logs and/or screenshots
TBD
Possible fixes
-
frontend look into what events are triggered for the editor instance when copy/paste happens ( policy_yaml_editor
Edited by Alexander Turinske