Class: Google::Apis::OndemandscanningV1::PackageData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PackageData

Returns a new instance of PackageData.



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

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

Instance Attribute Details

#architectureString

The architecture of the package. Corresponds to the JSON property architecture

Returns:

  • (String)


2042
2043
2044
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2042

def architecture
  @architecture
end

#binaryGoogle::Apis::OndemandscanningV1::Binary

The binary package. This is significant when the source is different than the binary itself. Historically if they've differed, we've stored the name of the source and its version in the package/version fields, but we should also store the binary package info, as that's what's actually installed. See https://b. corp.google.com/issues/175908657#comment15 Corresponds to the JSON property binary



2051
2052
2053
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2051

def binary
  @binary
end

#cpe_uriString

The cpe_uri in cpe format in which the vulnerability may manifest. Examples include distro or storage location for vulnerable jar. Corresponds to the JSON property cpeUri

Returns:

  • (String)


2058
2059
2060
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2058

def cpe_uri
  @cpe_uri
end

#dependency_chainArray<Google::Apis::OndemandscanningV1::LanguagePackageDependency>

The dependency chain between this package and the user's artifact. List in order from the customer's package under review first, to the current package last. Inclusive of the original package and the current package. Corresponds to the JSON property dependencyChain



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

def dependency_chain
  @dependency_chain
end

#file_locationArray<Google::Apis::OndemandscanningV1::FileLocation>

The path to the jar file / go binary file. Corresponds to the JSON property fileLocation



2070
2071
2072
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2070

def file_location
  @file_location
end

#hash_digestString

HashDigest stores the SHA512 hash digest of the jar file if the package is of type Maven. This field will be unset for non Maven packages. Corresponds to the JSON property hashDigest

Returns:

  • (String)


2076
2077
2078
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2076

def hash_digest
  @hash_digest
end

#maintainerGoogle::Apis::OndemandscanningV1::Maintainer

The maintainer of the package. Corresponds to the JSON property maintainer



2081
2082
2083
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2081

def maintainer
  @maintainer
end

#osString

The OS affected by a vulnerability Used to generate the cpe_uri for OS packages Corresponds to the JSON property os

Returns:

  • (String)


2087
2088
2089
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2087

def os
  @os
end

#os_versionString

The version of the OS Used to generate the cpe_uri for OS packages Corresponds to the JSON property osVersion

Returns:

  • (String)


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

def os_version
  @os_version
end

#packageString

The package being analysed for vulnerabilities Corresponds to the JSON property package

Returns:

  • (String)


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

def package
  @package
end

#package_typeString

The type of package: os, maven, go, etc. Corresponds to the JSON property packageType

Returns:

  • (String)


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

def package_type
  @package_type
end

#patched_cveArray<String>

CVEs that this package is no longer vulnerable to go/drydock-dd-custom-binary- scanning Corresponds to the JSON property patchedCve

Returns:

  • (Array<String>)


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

def patched_cve
  @patched_cve
end

#unusedString

Corresponds to the JSON property unused

Returns:

  • (String)


2113
2114
2115
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2113

def unused
  @unused
end

#versionString

The version of the package being analysed Corresponds to the JSON property version

Returns:

  • (String)


2118
2119
2120
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2118

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
# File 'lib/google/apis/ondemandscanning_v1/classes.rb', line 2125

def update!(**args)
  @architecture = args[:architecture] if args.key?(:architecture)
  @binary = args[:binary] if args.key?(:binary)
  @cpe_uri = args[:cpe_uri] if args.key?(:cpe_uri)
  @dependency_chain = args[:dependency_chain] if args.key?(:dependency_chain)
  @file_location = args[:file_location] if args.key?(:file_location)
  @hash_digest = args[:hash_digest] if args.key?(:hash_digest)
  @maintainer = args[:maintainer] if args.key?(:maintainer)
  @os = args[:os] if args.key?(:os)
  @os_version = args[:os_version] if args.key?(:os_version)
  @package = args[:package] if args.key?(:package)
  @package_type = args[:package_type] if args.key?(:package_type)
  @patched_cve = args[:patched_cve] if args.key?(:patched_cve)
  @unused = args[:unused] if args.key?(:unused)
  @version = args[:version] if args.key?(:version)
end