Skip to content

Policy schedule rule cron parsing bug

Artur Fedorov requested to merge 375490-invalid-cron-syntax into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR fixes #375490 (closed)

Before that if user typed invalid cron string in yaml mode, rule mode would still be active and it was possible to use it.

This MR adds cron string validation and disables rule mode in case of invalid cron string.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

before
before
after
after
after
after_2

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Go To ${PROJECT_ID}/-/security/policies/new?type=scan_execution_policy
  2. Select Schedule rule and switch to yaml mode
  3. Type in invalid cadence string and switch back to rule mode
  4. Rule mode should be disabled

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #375490 (closed)

Edited by Artur Fedorov

Merge request reports

Loading