Sha256: dac6534ff1896c35a77ac382a103c33774c63481f7252a58fc5385c1d1aee95a

Contents?: true

Size: 1.47 KB

Versions: 5

Compression:

Stored size: 1.47 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]

  #
  # Mass Assignment Security
  #

  attr_accessible :name

  ActiveSupport.run_load_hooks(:mdm_ref, self)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
metasploit_data_models-0.17.2-java app/models/mdm/ref.rb
metasploit_data_models-0.17.2 app/models/mdm/ref.rb
metasploit_data_models-0.17.2.pre.metasploit.pre.data.pre.models.pre.search app/models/mdm/ref.rb
metasploit_data_models-0.17.1-java app/models/mdm/ref.rb
metasploit_data_models-0.17.1 app/models/mdm/ref.rb