Class: Mdm::Ref

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/mdm/ref.rb

Overview

An external vulnerability reference for vulnerabilities that aren't part of a module. 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 Module::Detail.

Instance Attribute Summary collapse

Instance Attribute Details

#module_refsArray<Mdm::Module::Ref> (readonly)

Mdm::Module::Refs with the same name as this ref.

Returns:


13
14
15
16
# File 'app/models/mdm/ref.rb', line 13

has_many :module_refs,
:class_name => 'Mdm::Module::Ref',
:foreign_key => :name,
:primary_key => :name

#nameString

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.

Returns:

  • (String)

47
# File 'app/models/mdm/ref.rb', line 47

Metasploit::Concern.run(self)

#vulnsArray<Mdm::Vuln>

Vulnerabilities referenced by this reference.

Returns:


35
# File 'app/models/mdm/ref.rb', line 35

has_many :vulns, :class_name => 'Mdm::Vuln', :through => :vulns_refs

#vulns_refsArray<Mdm::VulnRef>

TODO:

MSP-3066

Join model to Mdm::Vulns. Use #vulns to get the actual Mdm::Vulns.

Returns:


23
24
25
# File 'app/models/mdm/ref.rb', line 23

has_many :vulns_refs,
:class_name => 'Mdm::VulnRef',
inverse_of: :ref