Class: Google::Apis::OndemandscanningV1::VulnerabilityOccurrence

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

Overview

An occurrence of a severity vulnerability on a resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VulnerabilityOccurrence

Returns a new instance of VulnerabilityOccurrence.



2203
2204
2205
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2203

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

Instance Attribute Details

#cvss_scoreFloat

Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity. Corresponds to the JSON property cvssScore

Returns:

  • (Float)


2151
2152
2153
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2151

def cvss_score
  @cvss_score
end

#effective_severityString

The distro assigned severity for this vulnerability when it is available, otherwise this is the note provider assigned severity. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues. Corresponds to the JSON property effectiveSeverity

Returns:

  • (String)


2163
2164
2165
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2163

def effective_severity
  @effective_severity
end

#fix_availableBoolean Also known as: fix_available?

Output only. Whether at least one of the affected packages has a fix available. Corresponds to the JSON property fixAvailable

Returns:

  • (Boolean)


2168
2169
2170
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2168

def fix_available
  @fix_available
end

#long_descriptionString

Output only. A detailed description of this vulnerability. Corresponds to the JSON property longDescription

Returns:

  • (String)


2174
2175
2176
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2174

def long_description
  @long_description
end

#package_issueArray<Google::Apis::OndemandscanningV1::PackageIssue>

Required. The set of affected locations and their fixes (if available) within the associated resource. Corresponds to the JSON property packageIssue



2180
2181
2182
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2180

def package_issue
  @package_issue
end

Output only. URLs related to this vulnerability. Corresponds to the JSON property relatedUrls



2185
2186
2187
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2185

def related_urls
  @related_urls
end

#severityString

Output only. The note provider assigned severity of this vulnerability. Corresponds to the JSON property severity

Returns:

  • (String)


2190
2191
2192
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2190

def severity
  @severity
end

#short_descriptionString

Output only. A one sentence description of this vulnerability. Corresponds to the JSON property shortDescription

Returns:

  • (String)


2195
2196
2197
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2195

def short_description
  @short_description
end

#typeString

The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.). Corresponds to the JSON property type

Returns:

  • (String)


2201
2202
2203
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2201

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2208

def update!(**args)
  @cvss_score = args[:cvss_score] if args.key?(:cvss_score)
  @effective_severity = args[:effective_severity] if args.key?(:effective_severity)
  @fix_available = args[:fix_available] if args.key?(:fix_available)
  @long_description = args[:long_description] if args.key?(:long_description)
  @package_issue = args[:package_issue] if args.key?(:package_issue)
  @related_urls = args[:related_urls] if args.key?(:related_urls)
  @severity = args[:severity] if args.key?(:severity)
  @short_description = args[:short_description] if args.key?(:short_description)
  @type = args[:type] if args.key?(:type)
end