Change categories validation script to use Ruby instead of Python

What does this MR do and why?

WHAT

  • This MR changes the scripts/lint/validate_release_categories.py to scripts/lint/validate_release_categories.rb.
  • Related to issue mentioned in References section below.

WHY

  • Ruby has more built in functionality to parse YAML which is needed to check frontmatter case (newly introduced in leaf bundles).
  • GitLab is primarily written in Ruby so let's keep our scripts in Ruby as well.

References

Related issue: gitlab-org/technical-writing/docs-gitlab-com#672 (comment 3425101833)

How to set up and validate locally

  1. Locally change a file under doc/releases to have an error for example. Remove the category tag comment in file doc/releases/19/gitlab-19-1-released/clearer-security-labels.md and add it to frontmatter like the following
---
title: Clearer, security industry-standard labels in vulnerability details
stage: application_security_testing
weight:  
level: secondary
tier: ultimate
offering: [ gitlab_com, self_managed, gitlab_dedicated ] 
documentation_link: "../../../user/application_security/vulnerabilities/"
work_item: "https://gitlab.com/groups/gitlab-org/-/work_items/21978"
categories: [ Vulnerability Management ]
---

In GitLab 19.1, the vulnerability results details page uses consistent, descriptive, and security industry-standard terminology for scan results:

- **Scanner** is now **Detected by**
- **EPSS** is now **Exploit Probability (EPSS)**
- **Has Known Exploit (KEV)** is now **Known Exploited (CISA KEV)**
- **Reachable** is now **Reachability**
- **Image** is now **Container Image** (Container Scanning)
- **Location** is now **Affected Location**
- **URL** is now **Affected Endpoint** (DAST, API fuzzing)
- **Method** is now **HTTP Method** (DAST, API fuzzing)
- **Solution** is now **Remediation Guidance**
- **Links** is now **References**
  1. For error scenario put a category that is not real like "BAD CATEGORY":
---
title: Clearer, security industry-standard labels in vulnerability details
stage: application_security_testing
weight:  
level: secondary
tier: ultimate
offering: [ gitlab_com, self_managed, gitlab_dedicated ] 
documentation_link: "../../../user/application_security/vulnerabilities/"
work_item: "https://gitlab.com/groups/gitlab-org/-/work_items/21978"
categories: [ BAD CATEGORY ]
---

In GitLab 19.1, the vulnerability results details page uses consistent, descriptive, and security industry-standard terminology for scan results:

- **Scanner** is now **Detected by**
- **EPSS** is now **Exploit Probability (EPSS)**
- **Has Known Exploit (KEV)** is now **Known Exploited (CISA KEV)**
- **Reachable** is now **Reachability**
- **Image** is now **Container Image** (Container Scanning)
- **Location** is now **Affected Location**
- **URL** is now **Affected Endpoint** (DAST, API fuzzing)
- **Method** is now **HTTP Method** (DAST, API fuzzing)
- **Solution** is now **Remediation Guidance**
- **Links** is now **References**

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Hiru Fernando

Merge request reports

Loading