Fix problem with running scheduled policies when variables are empty
What does this MR do and why?
When no variables were provided in the policy configuration (actions
), the pipeline was not executed with error:
Variables key can't be blank, Variables key can contain only letters, digits and '_'., and Failed to build the pipeline!
This MR fixes that problem.
How to set up and validate locally
- Create new project.
- Create new Policy Project (https://docs.gitlab.com/ee/user/application_security/policies/)
- Create new policy:
type: scan_execution_policy
name: Scheduled Policy
description: ''
enabled: true
rules:
- type: schedule
branches:
- main
cadence: 30 * * * *
actions:
- scan: sast
- Every hour the policy should be enforced and execute a SAST scan.
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 #346963 (closed)