# Grafeas V1 API - Class Grafeas::V1::VulnerabilityOccurrence (v1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.0 1.5.1 1.4.0 1.3.1 1.2.0 1.1.1 1.0.0 0.16.1 0.15.0 0.14.2 0.13.0 0.12.1 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.1 0.5.0 0.4.0 0.3.1 Reference documentation and code samples for the Grafeas V1 API class Grafeas::V1::VulnerabilityOccurrence.

An occurrence of a severity vulnerability on a resource.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #cvss_score

    def cvss_score() -> ::Float

**Returns**

- (::Float) --- 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.

### #cvss_score=

    def cvss_score=(value) -> ::Float

**Parameter**

- **value** (::Float) --- 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.
**Returns**

- (::Float) --- 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.

### #cvss_v2

    def cvss_v2() -> ::Grafeas::V1::CVSS

**Returns**

- ([::Grafeas::V1::CVSS](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-CVSS)) --- The cvss v2 score for the vulnerability.

### #cvss_v2=

    def cvss_v2=(value) -> ::Grafeas::V1::CVSS

**Parameter**

- **value** ([::Grafeas::V1::CVSS](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-CVSS)) --- The cvss v2 score for the vulnerability.
**Returns**

- ([::Grafeas::V1::CVSS](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-CVSS)) --- The cvss v2 score for the vulnerability.

### #cvss_version

    def cvss_version() -> ::Grafeas::V1::CVSSVersion

**Returns**

- ([::Grafeas::V1::CVSSVersion](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-CVSSVersion)) --- Output only. CVSS version used to populate cvss_score and severity.

### #cvss_version=

    def cvss_version=(value) -> ::Grafeas::V1::CVSSVersion

**Parameter**

- **value** ([::Grafeas::V1::CVSSVersion](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-CVSSVersion)) --- Output only. CVSS version used to populate cvss_score and severity.
**Returns**

- ([::Grafeas::V1::CVSSVersion](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-CVSSVersion)) --- Output only. CVSS version used to populate cvss_score and severity.

### #cvssv3

    def cvssv3() -> ::Grafeas::V1::CVSS

**Returns**

- ([::Grafeas::V1::CVSS](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-CVSS)) --- The cvss v3 score for the vulnerability.

### #cvssv3=

    def cvssv3=(value) -> ::Grafeas::V1::CVSS

**Parameter**

- **value** ([::Grafeas::V1::CVSS](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-CVSS)) --- The cvss v3 score for the vulnerability.
**Returns**

- ([::Grafeas::V1::CVSS](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-CVSS)) --- The cvss v3 score for the vulnerability.

### #effective_severity

    def effective_severity() -> ::Grafeas::V1::Severity

**Returns**

- ([::Grafeas::V1::Severity](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-Severity)) --- 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.

### #effective_severity=

    def effective_severity=(value) -> ::Grafeas::V1::Severity

**Parameter**

- **value** ([::Grafeas::V1::Severity](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-Severity)) --- 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.
**Returns**

- ([::Grafeas::V1::Severity](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-Severity)) --- 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.

### #extra_details

    def extra_details() -> ::String

**Returns**

- (::String) --- Occurrence-specific extra details about the vulnerability.

### #extra_details=

    def extra_details=(value) -> ::String

**Parameter**

- **value** (::String) --- Occurrence-specific extra details about the vulnerability.
**Returns**

- (::String) --- Occurrence-specific extra details about the vulnerability.

### #fix_available

    def fix_available() -> ::Boolean

**Returns**

- (::Boolean) --- Output only. Whether at least one of the affected packages has a fix available.

### #fix_available=

    def fix_available=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Output only. Whether at least one of the affected packages has a fix available.
**Returns**

- (::Boolean) --- Output only. Whether at least one of the affected packages has a fix available.

### #long_description

    def long_description() -> ::String

**Returns**

- (::String) --- Output only. A detailed description of this vulnerability.

### #long_description=

    def long_description=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. A detailed description of this vulnerability.
**Returns**

- (::String) --- Output only. A detailed description of this vulnerability.

### #package_issue

    def package_issue() -> ::Array<::Grafeas::V1::VulnerabilityOccurrence::PackageIssue>

**Returns**

- (::Array\<[::Grafeas::V1::VulnerabilityOccurrence::PackageIssue](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-VulnerabilityOccurrence-PackageIssue)\>) --- Required. The set of affected locations and their fixes (if available) within the associated resource.

### #package_issue=

    def package_issue=(value) -> ::Array<::Grafeas::V1::VulnerabilityOccurrence::PackageIssue>

**Parameter**

- **value** (::Array\<[::Grafeas::V1::VulnerabilityOccurrence::PackageIssue](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-VulnerabilityOccurrence-PackageIssue)\>) --- Required. The set of affected locations and their fixes (if available) within the associated resource.
**Returns**

- (::Array\<[::Grafeas::V1::VulnerabilityOccurrence::PackageIssue](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-VulnerabilityOccurrence-PackageIssue)\>) --- Required. The set of affected locations and their fixes (if available) within the associated resource.

### #related_urls

    def related_urls() -> ::Array<::Grafeas::V1::RelatedUrl>

**Returns**

- (::Array\<[::Grafeas::V1::RelatedUrl](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-RelatedUrl)\>) --- Output only. URLs related to this vulnerability.

### #related_urls=

    def related_urls=(value) -> ::Array<::Grafeas::V1::RelatedUrl>

**Parameter**

- **value** (::Array\<[::Grafeas::V1::RelatedUrl](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-RelatedUrl)\>) --- Output only. URLs related to this vulnerability.
**Returns**

- (::Array\<[::Grafeas::V1::RelatedUrl](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-RelatedUrl)\>) --- Output only. URLs related to this vulnerability.

### #risk

    def risk() -> ::Grafeas::V1::Risk

**Returns**

- ([::Grafeas::V1::Risk](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-Risk)) --- Risk information about the vulnerability, such as CISA, EPSS, etc.

### #risk=

    def risk=(value) -> ::Grafeas::V1::Risk

**Parameter**

- **value** ([::Grafeas::V1::Risk](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-Risk)) --- Risk information about the vulnerability, such as CISA, EPSS, etc.
**Returns**

- ([::Grafeas::V1::Risk](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-Risk)) --- Risk information about the vulnerability, such as CISA, EPSS, etc.

### #severity

    def severity() -> ::Grafeas::V1::Severity

**Returns**

- ([::Grafeas::V1::Severity](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-Severity)) --- Output only. The note provider assigned severity of this vulnerability.

### #severity=

    def severity=(value) -> ::Grafeas::V1::Severity

**Parameter**

- **value** ([::Grafeas::V1::Severity](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-Severity)) --- Output only. The note provider assigned severity of this vulnerability.
**Returns**

- ([::Grafeas::V1::Severity](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-Severity)) --- Output only. The note provider assigned severity of this vulnerability.

### #short_description

    def short_description() -> ::String

**Returns**

- (::String) --- Output only. A one sentence description of this vulnerability.

### #short_description=

    def short_description=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. A one sentence description of this vulnerability.
**Returns**

- (::String) --- Output only. A one sentence description of this vulnerability.

### #type

    def type() -> ::String

**Returns**

- (::String) --- The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).

### #type=

    def type=(value) -> ::String

**Parameter**

- **value** (::String) --- The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).
**Returns**

- (::String) --- The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).

### #vex_assessment

    def vex_assessment() -> ::Grafeas::V1::VulnerabilityOccurrence::VexAssessment

**Returns**

- ([::Grafeas::V1::VulnerabilityOccurrence::VexAssessment](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-VulnerabilityOccurrence-VexAssessment))

### #vex_assessment=

    def vex_assessment=(value) -> ::Grafeas::V1::VulnerabilityOccurrence::VexAssessment

**Parameter**

- **value** ([::Grafeas::V1::VulnerabilityOccurrence::VexAssessment](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-VulnerabilityOccurrence-VexAssessment))
**Returns**

- ([::Grafeas::V1::VulnerabilityOccurrence::VexAssessment](https://docs.cloud.google.com/ruby/docs/reference/grafeas-v1/latest/Grafeas-V1-VulnerabilityOccurrence-VexAssessment))