mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-06 10:19:48 +00:00
29 lines
620 B
Ruby
29 lines
620 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Placeholder class for model that is implemented in EE
|
|
class Vulnerability < Gitlab::Database::SecApplicationRecord
|
|
include EachBatch
|
|
include AfterCommitQueue
|
|
|
|
alias_attribute :vulnerability_id, :id
|
|
|
|
scope :with_projects, -> { preload(:project) }
|
|
|
|
validates :cvss, json_schema: { filename: "vulnerability_cvss_vectors", draft: 7 }
|
|
attribute :cvss, ::Gitlab::Database::Type::IndifferentJsonb.new
|
|
|
|
def self.link_reference_pattern
|
|
nil
|
|
end
|
|
|
|
def self.reference_prefix
|
|
'[vulnerability:'
|
|
end
|
|
|
|
def self.reference_postfix
|
|
']'
|
|
end
|
|
end
|
|
|
|
Vulnerability.prepend_mod
|