Add template selection to scan execution actions
What does this MR do and why?
Add template selection to scan execution actions
- add criteria to allow users to select between the default and latest security job template
- remove yaml if
default
is selected
Changelog: added
EE: true
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Screenshots |
---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Project-level
- Upload a GitLab Ultimate license
- Enable the project feature flag
echo "Feature.enable(:scan_execution_policies_with_latest_templates)" | rails c
- Navigate to a project/group => Secure => Policies => New policy => Scan execution => Under "Action", click "Add new criteria" => Template criteria
- Verify the yaml updates
- Change the value
- Verify the yaml updates
- Navigate to yaml mode => Modify the template => Navigate back to rule mode
- Verify rule mode is disabled for an invalid template value
- Verify rule mode is changed for a valid template value
Group-level
- Upload a GitLab Ultimate license
- Enable the group feature flag
echo "Feature.enable(:scan_execution_policies_with_latest_templates_group)" | rails c
- Navigate to a group => Secure => Policies => New policy => Scan execution => Under "Action", click "Add new criteria" => Template criteria
- Verify the yaml updates
- Change the value
- Verify the yaml updates
- Navigate to yaml mode => Modify the template => Navigate back to rule mode
- Verify rule mode is disabled for an invalid template value
- Verify rule mode is changed for a valid template value
Related to #415427 (closed)
Edited by Alexander Turinske