Class: Google::Apis::ContaineranalysisV1beta1::Vulnerability

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/containeranalysis_v1beta1/classes.rb,
lib/google/apis/containeranalysis_v1beta1/representations.rb,
lib/google/apis/containeranalysis_v1beta1/representations.rb

Overview

Vulnerability provides metadata about a security vulnerability in a Note.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Vulnerability

Returns a new instance of Vulnerability.



6856
6857
6858
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6856

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cvss_scoreFloat

The CVSS score for this vulnerability. Corresponds to the JSON property cvssScore

Returns:

  • (Float)


6801
6802
6803
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6801

def cvss_score
  @cvss_score
end

#cvss_v2Google::Apis::ContaineranalysisV1beta1::Cvss

Common Vulnerability Scoring System. This message is compatible with CVSS v2 and v3. For CVSS v2 details, see https://www.first.org/cvss/v2/guide CVSS v2 calculator: https://nvd.nist.gov/vuln-metrics/cvss/v2-calculator For CVSS v3 details, see https://www.first.org/cvss/specification-document CVSS v3 calculator: https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator Corresponds to the JSON property cvssV2



6810
6811
6812
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6810

def cvss_v2
  @cvss_v2
end

#cvss_v3Google::Apis::ContaineranalysisV1beta1::CvsSv3

Deprecated. Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document Corresponds to the JSON property cvssV3



6816
6817
6818
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6816

def cvss_v3
  @cvss_v3
end

#cvss_versionString

CVSS version used to populate cvss_score and severity. Corresponds to the JSON property cvssVersion

Returns:

  • (String)


6821
6822
6823
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6821

def cvss_version
  @cvss_version
end

#cweArray<String>

A list of CWE for this vulnerability. For details, see: https://cwe.mitre.org/ index.html Corresponds to the JSON property cwe

Returns:

  • (Array<String>)


6827
6828
6829
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6827

def cwe
  @cwe
end

#detailsArray<Google::Apis::ContaineranalysisV1beta1::Detail>

All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. Corresponds to the JSON property details



6834
6835
6836
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6834

def details
  @details
end

#severityString

Note provider assigned impact of the vulnerability. Corresponds to the JSON property severity

Returns:

  • (String)


6839
6840
6841
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6839

def severity
  @severity
end

#source_update_timeString

The time this information was last changed at the source. This is an upstream timestamp from the underlying information source - e.g. Ubuntu security tracker. Corresponds to the JSON property sourceUpdateTime

Returns:

  • (String)


6846
6847
6848
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6846

def source_update_time
  @source_update_time
end

#windows_detailsArray<Google::Apis::ContaineranalysisV1beta1::WindowsDetail>

Windows details get their own format because the information format and model don't match a normal detail. Specifically Windows updates are done as patches, thus Windows vulnerabilities really are a missing package, rather than a package being at an incorrect version. Corresponds to the JSON property windowsDetails



6854
6855
6856
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6854

def windows_details
  @windows_details
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
# File 'lib/google/apis/containeranalysis_v1beta1/classes.rb', line 6861

def update!(**args)
  @cvss_score = args[:cvss_score] if args.key?(:cvss_score)
  @cvss_v2 = args[:cvss_v2] if args.key?(:cvss_v2)
  @cvss_v3 = args[:cvss_v3] if args.key?(:cvss_v3)
  @cvss_version = args[:cvss_version] if args.key?(:cvss_version)
  @cwe = args[:cwe] if args.key?(:cwe)
  @details = args[:details] if args.key?(:details)
  @severity = args[:severity] if args.key?(:severity)
  @source_update_time = args[:source_update_time] if args.key?(:source_update_time)
  @windows_details = args[:windows_details] if args.key?(:windows_details)
end