Skip to content

Set a limit of 255 characters for security policy names

Sam White requested to merge sam-add-fullname-approval-rule into master

What does this MR do and why?

This MR makes the following changes to address the behavior reported in !88679 (comment 1002820788)

  • Removes the previous backend truncation of the security policy name at 25 characters
  • Introduces a schema limit of 255 characters for security policy names.

Screenshots or screen recordings

Previous behavior

Screen_Shot_2022-06-29_at_3.02.11_PM

Screen_Shot_2022-06-29_at_3.02.43_PM

Screen_Shot_2022-06-29_at_3.03.16_PM

Current behaviour

Existing policies (with name length longer than the new limit)

Screen_Shot_2022-06-29_at_3.20.47_PM

Screen_Shot_2022-06-29_at_3.14.50_PM

Screen_Shot_2022-06-29_at_3.14.58_PM

New policies

Screen_Shot_2022-06-29_at_3.40.34_PM

How to set up and validate locally

  1. Create a group where you are the group owner. This requires a GitLab Ultimate license.
  2. Create a project in the group "Development Project"
  3. Navigate to the project -> Security & Compliance -> Policies page
  4. Create a new Scan Result policy with a long name
  5. Click "Configure with a merge request". This will create a new "Security Policy Project" in the same group and will open a merge request in that newly created project.
  6. Merge in the auto-generated merge request
  7. Navigate back to your "Development Project" and open a merge request in that project
  8. View the security approval rule on the MR page

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sam White

Merge request reports