Skip to content

Update policy-editor-layout to include rule mode

Alexander Turinske requested to merge 359884-scan-execution-rule-mode into master

What does this MR do and why?

  • the rule mode for policies should look exactly the same except for the rules and actions
  • incorporate the name, description, and enabled radio into the default policy-editor-layout rule-mode configuration so that it does not need to be reimplemented every time
  • add new feature flag for scan execution rule mode

Screenshots or screen recordings

Page Before After - FF on After - FF off
Scan Result - Rule Mode Screen_Shot_2022-06-14_at_13.56.42 No visual change No visual change
Scan Result - Yaml Mode Screen_Shot_2022-06-14_at_13.56.48 No visual change No visual change
Scan Result - Rule Mode - Parsing Error Screen_Shot_2022-06-14_at_13.20.20 No visual change No visual change
Scan Execution - Rule Mode N/A image N/A
Scan Execution - Yaml Mode image Screen_Shot_2022-06-14_at_14.26.40 Screen_Shot_2022-06-14_at_14.25.15
Scan Execution - Rule Mode - Parsing Error Not implemented yet Not implemented yet Not implemented yet
Page After - FF on
Scan Execution scan_execution_-_ff_on
Scan Result scan_result_-_ff_on

How to set up and validate locally

  1. Ensure your GDK has a GitLab Ultimate license uploaded
  2. Enable the :scan_execution_rule_mode feature flag
  3. Navigate to a project => Security and Compliance => Policies => New policy
  4. Select Scan Execution Policy
  5. Verify the Rule mode exists and is selected first
  6. Verify changes made on Rule/YAML mode are translated over to the other mode
  7. Navigate back to the beginning and select Scan Result Policy
  8. Verify everything works as expected
  9. Navigate to a project => Security and Compliance => Policies
  10. Select an existing Scan Result Policy and select Edit Policy
  11. Cause a parsing error and ensure the alert appears

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 #359884 (closed)

Edited by Alexander Turinske

Merge request reports