Fix matching license policy names when contains whitespaces
What does this MR do and why?
This MR fixes the problem where license policy name container whitespaces at the beginning or the end of the name. We are stripping these values to remove this problem.
How to set up and validate locally
- Create project and configure simple
.gitlab-ci.yml
file - Enable License-Scanning (https://docs.gitlab.com/ee/user/compliance/license_compliance/#include-the-license-scanning-template)
- Copy https://gitlab.com/gitlab-org/gitlab/-/blob/master/package.json to the repository
- Wait for pipeline to finish
- Go to
Security & Compliance
->License compliance
->Policies
- Try to create new policy with additional whitespace at the beginning and the end of the name
- Notice that it is being saved with stripped 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #387987 (closed)