Class: Google::Apis::OndemandscanningV1::Occurrence

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 instance of an analysis type that has been found on a resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Occurrence

Returns a new instance of Occurrence.



2136
2137
2138
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2136

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

Instance Attribute Details

#attestationGoogle::Apis::OndemandscanningV1::AttestationOccurrence

Occurrence that represents a single "attestation". The authenticity of an attestation can be verified using the attached signature. If the verifier trusts the public key of the signer, then verifying the signature is sufficient to establish trust. In this circumstance, the authority to which this attestation is attached is primarily useful for lookup (how to find this attestation if you already know the authority and artifact to be verified) and intent (for which authority this attestation was intended to sign. Corresponds to the JSON property attestation



2028
2029
2030
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2028

def attestation
  @attestation
end

#buildGoogle::Apis::OndemandscanningV1::BuildOccurrence

Details of a build occurrence. Corresponds to the JSON property build



2033
2034
2035
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2033

def build
  @build
end

#complianceGoogle::Apis::OndemandscanningV1::ComplianceOccurrence

An indication that the compliance checks in the associated ComplianceNote were not satisfied for particular resources or a specified reason. Corresponds to the JSON property compliance



2039
2040
2041
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2039

def compliance
  @compliance
end

#create_timeString

Output only. The time this occurrence was created. Corresponds to the JSON property createTime

Returns:

  • (String)


2044
2045
2046
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2044

def create_time
  @create_time
end

#deploymentGoogle::Apis::OndemandscanningV1::DeploymentOccurrence

The period during which some deployable was active in a runtime. Corresponds to the JSON property deployment



2049
2050
2051
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2049

def deployment
  @deployment
end

#discoveryGoogle::Apis::OndemandscanningV1::DiscoveryOccurrence

Provides information about the analysis status of a discovered resource. Corresponds to the JSON property discovery



2054
2055
2056
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2054

def discovery
  @discovery
end

#dsse_attestationGoogle::Apis::OndemandscanningV1::DsseAttestationOccurrence

Deprecated. Prefer to use a regular Occurrence, and populate the Envelope at the top level of the Occurrence. Corresponds to the JSON property dsseAttestation



2060
2061
2062
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2060

def dsse_attestation
  @dsse_attestation
end

#envelopeGoogle::Apis::OndemandscanningV1::Envelope

MUST match https://github.com/secure-systems-lab/dsse/blob/master/envelope. proto. An authenticated message of arbitrary type. Corresponds to the JSON property envelope



2066
2067
2068
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2066

def envelope
  @envelope
end

#imageGoogle::Apis::OndemandscanningV1::ImageOccurrence

Details of the derived image portion of the DockerImage relationship. This image would be produced from a Dockerfile with FROM . Corresponds to the JSON property image



2072
2073
2074
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2072

def image
  @image
end

#kindString

Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests. Corresponds to the JSON property kind

Returns:

  • (String)


2078
2079
2080
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2078

def kind
  @kind
end

#nameString

Output only. The name of the occurrence in the form of projects/[PROJECT_ID]/ occurrences/[OCCURRENCE_ID]. Corresponds to the JSON property name

Returns:

  • (String)


2084
2085
2086
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2084

def name
  @name
end

#note_nameString

Required. Immutable. The analysis note associated with this occurrence, in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID]. This field can be used as a filter in list requests. Corresponds to the JSON property noteName

Returns:

  • (String)


2091
2092
2093
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2091

def note_name
  @note_name
end

#packageGoogle::Apis::OndemandscanningV1::PackageOccurrence

Details on how a particular software package was installed on a system. Corresponds to the JSON property package



2096
2097
2098
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2096

def package
  @package
end

#remediationString

A description of actions that can be taken to remedy the note. Corresponds to the JSON property remediation

Returns:

  • (String)


2101
2102
2103
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2101

def remediation
  @remediation
end

#resource_uriString

Required. Immutable. A URI that represents the resource for which the occurrence applies. For example, https://gcr.io/project/image@sha256:123abc for a Docker image. Corresponds to the JSON property resourceUri

Returns:

  • (String)


2108
2109
2110
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2108

def resource_uri
  @resource_uri
end

#sbom_referenceGoogle::Apis::OndemandscanningV1::SbomReferenceOccurrence

The occurrence representing an SBOM reference as applied to a specific resource. The occurrence follows the DSSE specification. See https://github. com/secure-systems-lab/dsse/blob/master/envelope.md for more details. Corresponds to the JSON property sbomReference



2115
2116
2117
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2115

def sbom_reference
  @sbom_reference
end

#update_timeString

Output only. The time this occurrence was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


2120
2121
2122
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2120

def update_time
  @update_time
end

#upgradeGoogle::Apis::OndemandscanningV1::UpgradeOccurrence

An Upgrade Occurrence represents that a specific resource_url could install a specific upgrade. This presence is supplied via local sources (i.e. it is present in the mirror and the running system has noticed its availability). For Windows, both distribution and windows_update contain information for the Windows update. Corresponds to the JSON property upgrade



2129
2130
2131
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2129

def upgrade
  @upgrade
end

#vulnerabilityGoogle::Apis::OndemandscanningV1::VulnerabilityOccurrence

An occurrence of a severity vulnerability on a resource. Corresponds to the JSON property vulnerability



2134
2135
2136
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2134

def vulnerability
  @vulnerability
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2141

def update!(**args)
  @attestation = args[:attestation] if args.key?(:attestation)
  @build = args[:build] if args.key?(:build)
  @compliance = args[:compliance] if args.key?(:compliance)
  @create_time = args[:create_time] if args.key?(:create_time)
  @deployment = args[:deployment] if args.key?(:deployment)
  @discovery = args[:discovery] if args.key?(:discovery)
  @dsse_attestation = args[:dsse_attestation] if args.key?(:dsse_attestation)
  @envelope = args[:envelope] if args.key?(:envelope)
  @image = args[:image] if args.key?(:image)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @note_name = args[:note_name] if args.key?(:note_name)
  @package = args[:package] if args.key?(:package)
  @remediation = args[:remediation] if args.key?(:remediation)
  @resource_uri = args[:resource_uri] if args.key?(:resource_uri)
  @sbom_reference = args[:sbom_reference] if args.key?(:sbom_reference)
  @update_time = args[:update_time] if args.key?(:update_time)
  @upgrade = args[:upgrade] if args.key?(:upgrade)
  @vulnerability = args[:vulnerability] if args.key?(:vulnerability)
end