Skip to content

Humanised strings for branch exceptions for scan result policy

Artur Fedorov requested to merge 418744-policy-drawer-branch-exceptions into master

What does this MR do and why?

This MR partially resolves #418744 (closed)

Policy drawer has humanised strings for branch exceptions in security result 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.

VERSION 1

Project Level Group Level
Screenshot 2023-08-09 at 15.40.13.png Screenshot 2023-08-09 at 15.40.26.png

VERSION 2

Project Level Group Level
project_level.mov group_level.mov

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 result policy

  4. Add security scan rule or license 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 result 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

Loading