34 lines
798 B
Ruby
34 lines
798 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Placeholder class for model that is implemented in EE
|
|
class Vulnerability < ApplicationRecord
|
|
include EachBatch
|
|
include IgnorableColumns
|
|
|
|
ignore_column %i[due_date due_date_sourcing_milestone_id epic_id milestone_id
|
|
last_edited_at last_edited_by_id start_date start_date_sourcing_milestone_id updated_by_id],
|
|
remove_with: '16.9',
|
|
remove_after: '2024-01-19'
|
|
|
|
alias_attribute :vulnerability_id, :id
|
|
|
|
scope :with_projects, -> { includes(:project) }
|
|
|
|
validates :cvss, json_schema: { filename: "vulnerability_cvss_vectors", draft: 7 }
|
|
attribute :cvss, :ind_jsonb
|
|
|
|
def self.link_reference_pattern
|
|
nil
|
|
end
|
|
|
|
def self.reference_prefix
|
|
'[vulnerability:'
|
|
end
|
|
|
|
def self.reference_postfix
|
|
']'
|
|
end
|
|
end
|
|
|
|
Vulnerability.prepend_mod
|