Class: Homebrew::Vulns::Match::Evidence Private
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
ecosystem/name are the OSV package fields queried, so a hit's
affected[] entry can be matched back to this evidence.
subject_version is the version to evaluate that entry's ranges
against: the formula version for the primary source, the pinned
resource version for a resource, nil for distro (whose versions are
not comparable to ours). advisory carries the CPANSA record for
:cpansa evidence so its constraint strings survive to
#range_status. source_record is the Vulnerability this evidence
was matched against (attached at hit-construction time), so after
#dedup_by_cve merges hits each evidence still points at the record
whose affected[] it should be checked against.
Instance Attribute Summary collapse
-
#advisory ⇒ Object
private
Returns the value of attribute advisory.
-
#ecosystem ⇒ Object
private
Returns the value of attribute ecosystem.
-
#key ⇒ Object
private
Returns the value of attribute key.
-
#name ⇒ Object
private
Returns the value of attribute name.
-
#resource ⇒ Object
private
Returns the value of attribute resource.
-
#source_record ⇒ Object
private
Returns the value of attribute source_record.
-
#strategy ⇒ Object
private
Returns the value of attribute strategy.
-
#subject_version ⇒ Object
private
Returns the value of attribute subject_version.
Instance Method Summary collapse
- #with_source(record) ⇒ T.untyped private
Instance Attribute Details
#advisory ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns the value of attribute advisory
63 64 65 |
# File 'vulns/match.rb', line 63 def advisory @advisory end |
#ecosystem ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns the value of attribute ecosystem
63 64 65 |
# File 'vulns/match.rb', line 63 def ecosystem @ecosystem end |
#key ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns the value of attribute key
63 64 65 |
# File 'vulns/match.rb', line 63 def key @key end |
#name ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns the value of attribute name
63 64 65 |
# File 'vulns/match.rb', line 63 def name @name end |
#resource ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns the value of attribute resource
63 64 65 |
# File 'vulns/match.rb', line 63 def resource @resource end |
#source_record ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns the value of attribute source_record
63 64 65 |
# File 'vulns/match.rb', line 63 def source_record @source_record end |
#strategy ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns the value of attribute strategy
63 64 65 |
# File 'vulns/match.rb', line 63 def strategy @strategy end |
#subject_version ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns the value of attribute subject_version
63 64 65 |
# File 'vulns/match.rb', line 63 def subject_version @subject_version end |
Instance Method Details
#with_source(record) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
66 67 68 |
# File 'vulns/match.rb', line 66 def with_source(record) source_record ? self : self.class.new(**to_h, source_record: record).freeze end |