Class: Homebrew::Vulns::Scanner::Results Private

Inherits:
Object
  • Object
show all
Defined in:
vulns/scanner.rb

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(findings:, checked:, skipped_formulae:, outdated_without_sbom: []) ⇒ void

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.

Parameters:



76
77
78
79
80
81
# File 'vulns/scanner.rb', line 76

def initialize(findings:, checked:, skipped_formulae:, outdated_without_sbom: [])
  @findings = findings
  @checked = checked
  @skipped_formulae = skipped_formulae
  @outdated_without_sbom = outdated_without_sbom
end

Instance Attribute Details

#checked ⇒ Integer (readonly)

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:



66
67
68
# File 'vulns/scanner.rb', line 66

def checked
  @checked
end

#findings ⇒ Array<Finding> (readonly)

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:



63
64
65
# File 'vulns/scanner.rb', line 63

def findings
  @findings
end

#outdated_without_sbom ⇒ Array<String> (readonly)

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:



69
70
71
# File 'vulns/scanner.rb', line 69

def outdated_without_sbom
  @outdated_without_sbom
end

#skipped_formulae ⇒ Array<String> (readonly)

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:



69
70
71
# File 'vulns/scanner.rb', line 69

def skipped_formulae
  @skipped_formulae
end

Instance Method Details

#any_open? ⇒ Boolean

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:

  • (Boolean)


89
90
91
# File 'vulns/scanner.rb', line 89

def any_open?
  findings.any? { |f| f.open.any? }
end

#skipped ⇒ Integer

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:



84
85
86
# File 'vulns/scanner.rb', line 84

def skipped
  skipped_formulae.size
end