Improve policy validation
From &5362 (comment 665128157)
When the user clicks the "Create merge request" button, we should check to see if they have a least one branch defined. If not, then we should show the following error message.
Implementation
-
frontend update DEFAULT_SCAN_EXECUTION_POLICY to the following:
type: scan_execution_policy
name: # name is mandatory
description: ''
enabled: false
rules:
- type: pipeline
branches:
- # branch is mandatory
actions:
- scan: dast
site_profile: ''
scanner_profile: ''
-
frontend add(this will be done as part of Interactive validation in security policy editor (#341419 - closed)) show error if it does not show, per the design. Link to docs for more information. This should be done in scan_execution_policy_editor componentnameandbranchesvalidation on the yaml and -
backend Add a check to ProcessPolicyServiceto ensure that all branches exist onpolicy_configuration.security_policy_management_project. -
backend Add new test cases to process_policy_service_spec.rbto ensure that policies cannot be created for non-existent branches.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
Edited by Alexander Turinske
