Add validation for timezone in scan execution policies
What does this MR do and why?
This MR adds validation for timezone in scan execution policies.
Screenshots or screen recordings
How to set up and validate locally
-
Navigate to
Security & Compliance
->Policies
->New policy
->Scan execution policy
-
Switch to
.yaml mode
-
Paste a policy with timezone. Example:
type: scan_execution_policy name: Test with TZ description: '' enabled: true rules: - type: schedule branches: - main cadence: 0 0 * * * timezone: invalid actions: - scan: dast tags: [ ] site_profile: Default scanner_profile: Default
-
Error should be displayed after submitting such policy
-
Changing the
timezone
to a valid timezone, for exampleAmerica/New_York
,Europe/Amsterdam
, orUTC
should submit successfully
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 #398259 (closed)