Class: Mdm::Ref

Inherits:
ActiveRecord::Base
  • 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)


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

#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_refsObject

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



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