Skip to content

Humanised strings for branch exceptions for scan execution policy

What does this MR do and why?

This MR partially resolves #418744 (closed)

Policy drawer has humanised strings for branch exceptions in security execution policy

UI mode is only supported for project level, for group level exceptions can be added via yaml mode

Screenshots or screen recordings

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

Description UI
Project level exceptions project level.mov
Group level group level.mov
No exceptions no exceptions.mov
Alignment fix alignment fix.png

How to set up and validate locally

Enable feature flag

Feature.enable(:security_policies_branch_exceptions)
  1. Go to a project

  2. Open Secure -> Policies

  3. Create new scan execution policy

  4. Add triggers condition or schedule scan rule

  5. Add some branch exceptions (if local project has no branches, you can add some)

  6. Create policy and go back to policy list Secure -> Policies

  7. Click on created policy -> result for project level will be in drawer description

  8. Go to a group

  9. Open Secure -> Policies

  10. Create new scan execution policy

  11. Open yaml mode, you can add branch exceptions for a rule

    branch_exceptions:
      - { name: ${BRANCH_NAME}, full_path: ${PATH_TO_PROJECT} }
      - { name: ${BRANCH_NAME_2 }, full_path: ${PATH_TO_PROJECT } }
  12. Create policy and go back to policy list Secure -> Policies

  13. Make sure that there is path in brackets right next to a branch name

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

Edited by Artur Fedorov

Merge request reports