Sha256: 74e7e1b557a7648eaceff35784e7c2d5a7f031a31f893b46d373e20e7eb88337

Contents?: true

Size: 1.41 KB

Versions: 44

Compression:

Stored size: 1.41 KB

Contents

# An external vulnerability reference for vulnerabilities that aren't part of a module.  {Mdm::Module::Ref} should be
# used whenever possible and Mdm::Ref should only be used when the vulnerability is from an import and can't be
# correlated to a module and its {Mdm::Module::Detail}.
class Mdm::Ref < ActiveRecord::Base
  #
  # Associations
  #

  # @!attribute [r] module_refs
  #   {Mdm::Module::Ref Mdm::Module::Refs} with the same name as this ref.
  #
  #   @return [Array<Mdm::Module::Ref>]
  has_many :module_refs,
           :class_name => 'Mdm::Module::Ref',
           :foreign_key => :name,
           :primary_key => :name

  # @!attribute [rw] vulns_refs
  #   Join model to {Mdm::Vuln Mdm::Vulns}.  Use {#vulns} to get the actual {Mdm::Vuln Mdm::Vulns}.
  #
  #   @todo MSP-3066
  #   @return [Array<Mdm::VulnRef>]
  has_many :vulns_refs,
           :class_name => 'Mdm::VulnRef',
           inverse_of: :ref

  #
  # Through :vuln_refs
  #

  # @!attribute [rw] vulns
  #   Vulnerabilities referenced by this reference.
  #
  #   @return [Array<Mdm::Vuln>]
  has_many :vulns, :class_name => 'Mdm::Vuln', :through => :vulns_refs

  #
  # Attributes
  #

  # @!attribute [rw] name
  #   Designation for external reference.  May include a prefix for the authority, such as 'CVE-', in which case the
  #   rest of the name is the designation assigned by that authority.
  #
  #   @return [String]

  Metasploit::Concern.run(self)
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
metasploit_data_models-2.0.7 app/models/mdm/ref.rb
metasploit_data_models-2.0.6 app/models/mdm/ref.rb
metasploit_data_models-2.0.5 app/models/mdm/ref.rb
metasploit_data_models-2.0.4 app/models/mdm/ref.rb
metasploit_data_models-2.0.1 app/models/mdm/ref.rb
metasploit_data_models-2.0.0 app/models/mdm/ref.rb
metasploit_data_models-1.3.0 app/models/mdm/ref.rb
metasploit_data_models-1.2.11 app/models/mdm/ref.rb
metasploit_data_models-1.2.10 app/models/mdm/ref.rb
metasploit_data_models-1.2.9 app/models/mdm/ref.rb
metasploit_data_models-1.2.8 app/models/mdm/ref.rb
metasploit_data_models-1.2.7 app/models/mdm/ref.rb
metasploit_data_models-1.2.6 app/models/mdm/ref.rb
metasploit_data_models-1.2.5 app/models/mdm/ref.rb
metasploit_data_models-1.2.4 app/models/mdm/ref.rb
metasploit_data_models-1.2.3 app/models/mdm/ref.rb
metasploit_data_models-1.2.2 app/models/mdm/ref.rb
metasploit_data_models-1.2.1 app/models/mdm/ref.rb
metasploit_data_models-1.2.0 app/models/mdm/ref.rb
metasploit_data_models-1.1.0 app/models/mdm/ref.rb