Skip to content

Rename DB tables and business logic objects related to Vulnerability Findings

Summary

After introducing the first-class vulnerabilities, only the REST API endpoints, model associations, and controller endpoints were renamed: former Vulnerabilities became Vulnerability Findings (more on terminology here). Example MRs where renaming has occurred: !16181 (merged), !16468 (merged).

But the rest of the classes related to Vulnerability Findings still have vulnerability semantics in their name (e.g., ::Security::VulnerabilitiesFinder). The same goes for DB tables (e.g., vulnerability_occurrences should become vulnerability_findings).

Improvements

The benefits of this refactoring are more clear (and correct) codebase in regards to the terminology which has already proven itself being complex enough to avoid any additional confusion.

Risks

Possible GitLab.com downtime caused by improper database tables/columns renaming.

Involved components

As of 2019-10-09:

  • Classes
    • Vulnerabilities::Occurrence
    • Vulnerabilities::OccurrenceIdentifier
    • Vulnerabilities::OccurrencePipeline
    • Vulnerabilities::OccurrencePresenter
    • GitLab::Vulnerabilities::OccurrencesPreloader
    • GitLab::Vulnerabilities::BaseVulnerability (probably)
    • GitLab::Vulnerabilities::StandardVulnerability (probably)
    • GitLab::Vulnerabilities::ContainerScanningVulnerability (probably)
    • DependencyEntity internals
    • EE::API::Entities::Dependency internals
    • Security::VulnerabilitiesFinder
    • ee/app/models/concerns/vulnerable.rb concern contents (fetching methods)
    • Gitlab::Vulnerabilities::HistoryCache#cache_key (the cache key itself; maybe worth extracting into a separate issue)
  • DB tables
    • vulnerability_occurrences
    • vulnerability_occurrence_pipelines
    • vulnerability_occurrence_identifiers
  • View helpers
    • ee/app/helpers/ee/projects_helper.rb (see the contents)
Edited by Victor Zagorodny