Improve cadence validation for scan execution policy
Improve the cadence validation for the scan execution policy creation according to the supported cadences in our documentation.
Feature flag: scan_execution_policy_cadence_validation
Verification steps
- Create a new project
- Before enabling the feature flag, create a scan execution policy with a unsupported cadence using the yaml mode. A policy like:
type: scan_execution_policy
name: policy
description: ''
enabled: false
rules:
- type: schedule
branches:
- '*'
cadence: '*/15 * * * *'
actions:
- scan: secret_detection
- Enable the feature flag
- Wait for the scheduled time and check the sidekiq logs for the error message "Invalid cadence"
- Go to Secure > Policies
- Try to save a policy with an unsupported cadence
- Verify the error message
Cadence is invalid
is displayed
Edited by Marcos Rocha