1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="containeranalysis_v1beta1.html">Container Analysis API</a> . <a href="containeranalysis_v1beta1.projects.html">projects</a> . <a href="containeranalysis_v1beta1.projects.notes.html">notes</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="containeranalysis_v1beta1.projects.notes.occurrences.html">occurrences()</a></code> 79</p> 80<p class="firstline">Returns the occurrences Resource.</p> 81 82<p class="toc_element"> 83 <code><a href="#batchCreate">batchCreate(parent, body=None, x__xgafv=None)</a></code></p> 84<p class="firstline">Creates new notes in batch.</p> 85<p class="toc_element"> 86 <code><a href="#close">close()</a></code></p> 87<p class="firstline">Close httplib2 connections.</p> 88<p class="toc_element"> 89 <code><a href="#create">create(parent, body=None, noteId=None, x__xgafv=None)</a></code></p> 90<p class="firstline">Creates a new note.</p> 91<p class="toc_element"> 92 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> 93<p class="firstline">Deletes the specified note.</p> 94<p class="toc_element"> 95 <code><a href="#get">get(name, x__xgafv=None)</a></code></p> 96<p class="firstline">Gets the specified note.</p> 97<p class="toc_element"> 98 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> 99<p class="firstline">Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.</p> 100<p class="toc_element"> 101 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 102<p class="firstline">Lists notes for the specified project.</p> 103<p class="toc_element"> 104 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 105<p class="firstline">Retrieves the next page of results.</p> 106<p class="toc_element"> 107 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> 108<p class="firstline">Updates the specified note.</p> 109<p class="toc_element"> 110 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> 111<p class="firstline">Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.</p> 112<p class="toc_element"> 113 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p> 114<p class="firstline">Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.</p> 115<h3>Method Details</h3> 116<div class="method"> 117 <code class="details" id="batchCreate">batchCreate(parent, body=None, x__xgafv=None)</code> 118 <pre>Creates new notes in batch. 119 120Args: 121 parent: string, Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created. (required) 122 body: object, The request body. 123 The object takes the form of: 124 125{ # Request to create notes in batch. 126 "notes": { # Required. The notes to create, the key is expected to be the note ID. Max allowed length is 1000. 127 "a_key": { # A type of analysis that can be done for a resource. 128 "attestationAuthority": { # Note kind that represents a logical attestation "role" or "authority". For example, an organization might have one `Authority` for "QA" and one for "build". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project. # A note describing an attestation role. 129 "hint": { # This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from "readable" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify. # Hint hints at the purpose of the attestation authority. 130 "humanReadableName": "A String", # Required. The human readable name of this attestation authority, for example "qa". 131 }, 132 }, 133 "baseImage": { # Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. # A note describing a base image. 134 "fingerprint": { # A set of properties that uniquely identify a given Docker image. # Required. Immutable. The fingerprint of the base image. 135 "v1Name": "A String", # Required. The layer ID of the final layer in the Docker image's v1 representation. 136 "v2Blob": [ # Required. The ordered list of v2 blobs that represent a given image. 137 "A String", 138 ], 139 "v2Name": "A String", # Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the final blob is kept. 140 }, 141 "resourceUrl": "A String", # Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images. 142 }, 143 "build": { # Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence. # A note describing build provenance for a verifiable build. 144 "builderVersion": "A String", # Required. Immutable. Version of the builder which produced this build. 145 "signature": { # Message encapsulating the signature of the verified build. # Signature of the build in occurrences pointing to this build note containing build details. 146 "keyId": "A String", # An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service). 147 "keyType": "A String", # The type of the key, either stored in `public_key` or referenced in `key_id`. 148 "publicKey": "A String", # Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys. This field may be empty if `key_id` references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 149 "signature": "A String", # Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded. 150 }, 151 }, 152 "createTime": "A String", # Output only. The time this note was created. This field can be used as a filter in list requests. 153 "deployable": { # An artifact that can be deployed in some runtime. # A note describing something that can be deployed. 154 "resourceUri": [ # Required. Resource URI for the artifact being deployed. 155 "A String", 156 ], 157 }, 158 "discovery": { # A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis. # A note describing the initial analysis of a resource. 159 "analysisKind": "A String", # Required. Immutable. The kind of analysis that is handled by this discovery. 160 }, 161 "expirationTime": "A String", # Time of expiration for this note. Empty if note does not expire. 162 "intoto": { # This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note. # A note describing an in-toto link. 163 "expectedCommand": [ # This field contains the expected command used to perform the step. 164 "A String", 165 ], 166 "expectedMaterials": [ # The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. 167 { # Defines an object to declare an in-toto artifact rule 168 "artifactRule": [ 169 "A String", 170 ], 171 }, 172 ], 173 "expectedProducts": [ 174 { # Defines an object to declare an in-toto artifact rule 175 "artifactRule": [ 176 "A String", 177 ], 178 }, 179 ], 180 "signingKeys": [ # This field contains the public keys that can be used to verify the signatures on the step metadata. 181 { # This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { "key_id": "776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...", "key_type": "rsa", "public_key_value": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0B...", "key_scheme": "rsassa-pss-sha256" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification. 182 "keyId": "A String", # key_id is an identifier for the signing key. 183 "keyScheme": "A String", # This field contains the corresponding signature scheme. Eg: "rsassa-pss-sha256". 184 "keyType": "A String", # This field identifies the specific signing method. Eg: "rsa", "ed25519", and "ecdsa". 185 "publicKeyValue": "A String", # This field contains the actual public key. 186 }, 187 ], 188 "stepName": "A String", # This field identifies the name of the step in the supply chain. 189 "threshold": "A String", # This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. 190 }, 191 "kind": "A String", # Output only. The type of analysis. This field can be used as a filter in list requests. 192 "longDescription": "A String", # A detailed description of this note. 193 "name": "A String", # Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 194 "package": { # This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions. # A note describing a package hosted by various package managers. 195 "distribution": [ # The various channels by which a package is distributed. 196 { # This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror. 197 "architecture": "A String", # The CPU architecture for which packages in this distribution channel were built. 198 "cpeUri": "A String", # Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. 199 "description": "A String", # The distribution channel-specific description of this package. 200 "latestVersion": { # Version contains structured information about the version of a package. # The latest available version of this package in this distribution channel. 201 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 202 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 203 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 204 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 205 "revision": "A String", # The iteration of the package build from the above version. 206 }, 207 "maintainer": "A String", # A freeform string denoting the maintainer of this package. 208 "url": "A String", # The distribution channel-specific homepage for this package. 209 }, 210 ], 211 "name": "A String", # Required. Immutable. The name of the package. 212 }, 213 "relatedNoteNames": [ # Other notes related to this note. 214 "A String", 215 ], 216 "relatedUrl": [ # URLs associated with this note. 217 { # Metadata for any related URL information. 218 "label": "A String", # Label to describe usage of the URL. 219 "url": "A String", # Specific URL associated with the resource. 220 }, 221 ], 222 "sbom": { # DocumentNote represents an SPDX Document Creation Infromation section: https://spdx.github.io/spdx-spec/2-document-creation-information/ # A note describing a software bill of materials. 223 "dataLicence": "A String", # Compliance with the SPDX specification includes populating the SPDX fields therein with data related to such fields ("SPDX-Metadata") 224 "spdxVersion": "A String", # Provide a reference number that can be used to understand how to parse and interpret the rest of the file 225 }, 226 "shortDescription": "A String", # A one sentence description of this note. 227 "spdxFile": { # FileNote represents an SPDX File Information section: https://spdx.github.io/spdx-spec/4-file-information/ # A note describing an SPDX File. 228 "checksum": [ # Provide a unique identifier to match analysis information on each specific file in a package 229 "A String", 230 ], 231 "fileType": "A String", # This field provides information about the type of file identified 232 "title": "A String", # Identify the full path and filename that corresponds to the file information in this section 233 }, 234 "spdxPackage": { # PackageInfoNote represents an SPDX Package Information section: https://spdx.github.io/spdx-spec/3-package-information/ # A note describing an SPDX Package. 235 "analyzed": True or False, # Indicates whether the file content of this package has been available for or subjected to analysis when creating the SPDX document 236 "attribution": "A String", # A place for the SPDX data creator to record, at the package level, acknowledgements that may be needed to be communicated in some contexts 237 "checksum": "A String", # Provide an independently reproducible mechanism that permits unique identification of a specific package that correlates to the data in this SPDX file 238 "copyright": "A String", # Identify the copyright holders of the package, as well as any dates present 239 "detailedDescription": "A String", # A more detailed description of the package 240 "downloadLocation": "A String", # This section identifies the download Universal Resource Locator (URL), or a specific location within a version control system (VCS) for the package at the time that the SPDX file was created 241 "externalRefs": [ # ExternalRef 242 { # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 243 "category": "A String", # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 244 "comment": "A String", # Human-readable information about the purpose and target of the reference 245 "locator": "A String", # The unique string with no spaces necessary to access the package-specific information, metadata, or content within the target location 246 "type": "A String", # Type of category (e.g. 'npm' for the PACKAGE_MANAGER category) 247 }, 248 ], 249 "filesLicenseInfo": [ # Contain the license the SPDX file creator has concluded as governing the This field is to contain a list of all licenses found in the package. The relationship between licenses (i.e., conjunctive, disjunctive) is not specified in this field – it is simply a listing of all licenses found 250 "A String", 251 ], 252 "homePage": "A String", # Provide a place for the SPDX file creator to record a web site that serves as the package's home page 253 "licenseDeclared": { # License information: https://spdx.github.io/spdx-spec/3-package-information/#315-declared-license # List the licenses that have been declared by the authors of the package 254 "comments": "A String", # Comments 255 "expression": "A String", # Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/ 256 }, 257 "originator": "A String", # If the package identified in the SPDX file originated from a different person or organization than identified as Package Supplier, this field identifies from where or whom the package originally came 258 "packageType": "A String", # The type of package: OS, MAVEN, GO, GO_STDLIB, etc. 259 "summaryDescription": "A String", # A short description of the package 260 "supplier": "A String", # Identify the actual distribution source for the package/directory identified in the SPDX file 261 "title": "A String", # Identify the full name of the package as given by the Package Originator 262 "verificationCode": "A String", # This field provides an independently reproducible mechanism identifying specific contents of a package based on the actual files (except the SPDX file itself, if it is included in the package) that make up each package and that correlates to the data in this SPDX file 263 "version": "A String", # Identify the version of the package 264 }, 265 "spdxRelationship": { # RelationshipNote represents an SPDX Relationship section: https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ # A note describing an SPDX File. 266 "type": "A String", # The type of relationship between the source and target SPDX elements 267 }, 268 "updateTime": "A String", # Output only. The time this note was last updated. This field can be used as a filter in list requests. 269 "vulnerability": { # Vulnerability provides metadata about a security vulnerability in a Note. # A note describing a package vulnerability. 270 "cvssScore": 3.14, # The CVSS score for this vulnerability. 271 "cvssV3": { # Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document # The full description of the CVSSv3. 272 "attackComplexity": "A String", 273 "attackVector": "A String", # Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. 274 "availabilityImpact": "A String", 275 "baseScore": 3.14, # The base score is a function of the base metric scores. 276 "confidentialityImpact": "A String", 277 "exploitabilityScore": 3.14, 278 "impactScore": 3.14, 279 "integrityImpact": "A String", 280 "privilegesRequired": "A String", 281 "scope": "A String", 282 "userInteraction": "A String", 283 }, 284 "details": [ # All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. 285 { # Identifies all appearances of this vulnerability in the package for a specific distro/location. For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 286 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 287 "description": "A String", # A vendor-specific description of this note. 288 "fixedLocation": { # The location of the vulnerability. # The fix for this specific package version. 289 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar. 290 "package": "A String", # Required. The package being described. 291 "version": { # Version contains structured information about the version of a package. # Required. The version of the package being described. 292 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 293 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 294 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 295 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 296 "revision": "A String", # The iteration of the package build from the above version. 297 }, 298 }, 299 "isObsolete": True or False, # Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. 300 "maxAffectedVersion": { # Version contains structured information about the version of a package. # The max version of the package in which the vulnerability exists. 301 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 302 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 303 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 304 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 305 "revision": "A String", # The iteration of the package build from the above version. 306 }, 307 "minAffectedVersion": { # Version contains structured information about the version of a package. # The min version of the package in which the vulnerability exists. 308 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 309 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 310 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 311 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 312 "revision": "A String", # The iteration of the package build from the above version. 313 }, 314 "package": "A String", # Required. The name of the package where the vulnerability was found. 315 "packageType": "A String", # The type of package; whether native or non native(ruby gems, node.js packages etc). 316 "severityName": "A String", # The severity (eg: distro assigned severity) for this vulnerability. 317 "source": "A String", # The source from which the information in this Detail was obtained. 318 "sourceUpdateTime": "A String", # 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. 319 "vendor": "A String", # The name of the vendor of the product. 320 }, 321 ], 322 "severity": "A String", # Note provider assigned impact of the vulnerability. 323 "sourceUpdateTime": "A String", # 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. 324 "windowsDetails": [ # 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. 325 { 326 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 327 "description": "A String", # The description of the vulnerability. 328 "fixingKbs": [ # Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix. 329 { 330 "name": "A String", # The KB name (generally of the form KB[0-9]+ i.e. KB123456). 331 "url": "A String", # A link to the KB in the Windows update catalog - https://www.catalog.update.microsoft.com/ 332 }, 333 ], 334 "name": "A String", # Required. The name of the vulnerability. 335 }, 336 ], 337 }, 338 }, 339 }, 340} 341 342 x__xgafv: string, V1 error format. 343 Allowed values 344 1 - v1 error format 345 2 - v2 error format 346 347Returns: 348 An object of the form: 349 350 { # Response for creating notes in batch. 351 "notes": [ # The notes that were created. 352 { # A type of analysis that can be done for a resource. 353 "attestationAuthority": { # Note kind that represents a logical attestation "role" or "authority". For example, an organization might have one `Authority` for "QA" and one for "build". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project. # A note describing an attestation role. 354 "hint": { # This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from "readable" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify. # Hint hints at the purpose of the attestation authority. 355 "humanReadableName": "A String", # Required. The human readable name of this attestation authority, for example "qa". 356 }, 357 }, 358 "baseImage": { # Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. # A note describing a base image. 359 "fingerprint": { # A set of properties that uniquely identify a given Docker image. # Required. Immutable. The fingerprint of the base image. 360 "v1Name": "A String", # Required. The layer ID of the final layer in the Docker image's v1 representation. 361 "v2Blob": [ # Required. The ordered list of v2 blobs that represent a given image. 362 "A String", 363 ], 364 "v2Name": "A String", # Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the final blob is kept. 365 }, 366 "resourceUrl": "A String", # Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images. 367 }, 368 "build": { # Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence. # A note describing build provenance for a verifiable build. 369 "builderVersion": "A String", # Required. Immutable. Version of the builder which produced this build. 370 "signature": { # Message encapsulating the signature of the verified build. # Signature of the build in occurrences pointing to this build note containing build details. 371 "keyId": "A String", # An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service). 372 "keyType": "A String", # The type of the key, either stored in `public_key` or referenced in `key_id`. 373 "publicKey": "A String", # Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys. This field may be empty if `key_id` references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 374 "signature": "A String", # Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded. 375 }, 376 }, 377 "createTime": "A String", # Output only. The time this note was created. This field can be used as a filter in list requests. 378 "deployable": { # An artifact that can be deployed in some runtime. # A note describing something that can be deployed. 379 "resourceUri": [ # Required. Resource URI for the artifact being deployed. 380 "A String", 381 ], 382 }, 383 "discovery": { # A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis. # A note describing the initial analysis of a resource. 384 "analysisKind": "A String", # Required. Immutable. The kind of analysis that is handled by this discovery. 385 }, 386 "expirationTime": "A String", # Time of expiration for this note. Empty if note does not expire. 387 "intoto": { # This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note. # A note describing an in-toto link. 388 "expectedCommand": [ # This field contains the expected command used to perform the step. 389 "A String", 390 ], 391 "expectedMaterials": [ # The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. 392 { # Defines an object to declare an in-toto artifact rule 393 "artifactRule": [ 394 "A String", 395 ], 396 }, 397 ], 398 "expectedProducts": [ 399 { # Defines an object to declare an in-toto artifact rule 400 "artifactRule": [ 401 "A String", 402 ], 403 }, 404 ], 405 "signingKeys": [ # This field contains the public keys that can be used to verify the signatures on the step metadata. 406 { # This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { "key_id": "776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...", "key_type": "rsa", "public_key_value": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0B...", "key_scheme": "rsassa-pss-sha256" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification. 407 "keyId": "A String", # key_id is an identifier for the signing key. 408 "keyScheme": "A String", # This field contains the corresponding signature scheme. Eg: "rsassa-pss-sha256". 409 "keyType": "A String", # This field identifies the specific signing method. Eg: "rsa", "ed25519", and "ecdsa". 410 "publicKeyValue": "A String", # This field contains the actual public key. 411 }, 412 ], 413 "stepName": "A String", # This field identifies the name of the step in the supply chain. 414 "threshold": "A String", # This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. 415 }, 416 "kind": "A String", # Output only. The type of analysis. This field can be used as a filter in list requests. 417 "longDescription": "A String", # A detailed description of this note. 418 "name": "A String", # Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 419 "package": { # This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions. # A note describing a package hosted by various package managers. 420 "distribution": [ # The various channels by which a package is distributed. 421 { # This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror. 422 "architecture": "A String", # The CPU architecture for which packages in this distribution channel were built. 423 "cpeUri": "A String", # Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. 424 "description": "A String", # The distribution channel-specific description of this package. 425 "latestVersion": { # Version contains structured information about the version of a package. # The latest available version of this package in this distribution channel. 426 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 427 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 428 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 429 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 430 "revision": "A String", # The iteration of the package build from the above version. 431 }, 432 "maintainer": "A String", # A freeform string denoting the maintainer of this package. 433 "url": "A String", # The distribution channel-specific homepage for this package. 434 }, 435 ], 436 "name": "A String", # Required. Immutable. The name of the package. 437 }, 438 "relatedNoteNames": [ # Other notes related to this note. 439 "A String", 440 ], 441 "relatedUrl": [ # URLs associated with this note. 442 { # Metadata for any related URL information. 443 "label": "A String", # Label to describe usage of the URL. 444 "url": "A String", # Specific URL associated with the resource. 445 }, 446 ], 447 "sbom": { # DocumentNote represents an SPDX Document Creation Infromation section: https://spdx.github.io/spdx-spec/2-document-creation-information/ # A note describing a software bill of materials. 448 "dataLicence": "A String", # Compliance with the SPDX specification includes populating the SPDX fields therein with data related to such fields ("SPDX-Metadata") 449 "spdxVersion": "A String", # Provide a reference number that can be used to understand how to parse and interpret the rest of the file 450 }, 451 "shortDescription": "A String", # A one sentence description of this note. 452 "spdxFile": { # FileNote represents an SPDX File Information section: https://spdx.github.io/spdx-spec/4-file-information/ # A note describing an SPDX File. 453 "checksum": [ # Provide a unique identifier to match analysis information on each specific file in a package 454 "A String", 455 ], 456 "fileType": "A String", # This field provides information about the type of file identified 457 "title": "A String", # Identify the full path and filename that corresponds to the file information in this section 458 }, 459 "spdxPackage": { # PackageInfoNote represents an SPDX Package Information section: https://spdx.github.io/spdx-spec/3-package-information/ # A note describing an SPDX Package. 460 "analyzed": True or False, # Indicates whether the file content of this package has been available for or subjected to analysis when creating the SPDX document 461 "attribution": "A String", # A place for the SPDX data creator to record, at the package level, acknowledgements that may be needed to be communicated in some contexts 462 "checksum": "A String", # Provide an independently reproducible mechanism that permits unique identification of a specific package that correlates to the data in this SPDX file 463 "copyright": "A String", # Identify the copyright holders of the package, as well as any dates present 464 "detailedDescription": "A String", # A more detailed description of the package 465 "downloadLocation": "A String", # This section identifies the download Universal Resource Locator (URL), or a specific location within a version control system (VCS) for the package at the time that the SPDX file was created 466 "externalRefs": [ # ExternalRef 467 { # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 468 "category": "A String", # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 469 "comment": "A String", # Human-readable information about the purpose and target of the reference 470 "locator": "A String", # The unique string with no spaces necessary to access the package-specific information, metadata, or content within the target location 471 "type": "A String", # Type of category (e.g. 'npm' for the PACKAGE_MANAGER category) 472 }, 473 ], 474 "filesLicenseInfo": [ # Contain the license the SPDX file creator has concluded as governing the This field is to contain a list of all licenses found in the package. The relationship between licenses (i.e., conjunctive, disjunctive) is not specified in this field – it is simply a listing of all licenses found 475 "A String", 476 ], 477 "homePage": "A String", # Provide a place for the SPDX file creator to record a web site that serves as the package's home page 478 "licenseDeclared": { # License information: https://spdx.github.io/spdx-spec/3-package-information/#315-declared-license # List the licenses that have been declared by the authors of the package 479 "comments": "A String", # Comments 480 "expression": "A String", # Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/ 481 }, 482 "originator": "A String", # If the package identified in the SPDX file originated from a different person or organization than identified as Package Supplier, this field identifies from where or whom the package originally came 483 "packageType": "A String", # The type of package: OS, MAVEN, GO, GO_STDLIB, etc. 484 "summaryDescription": "A String", # A short description of the package 485 "supplier": "A String", # Identify the actual distribution source for the package/directory identified in the SPDX file 486 "title": "A String", # Identify the full name of the package as given by the Package Originator 487 "verificationCode": "A String", # This field provides an independently reproducible mechanism identifying specific contents of a package based on the actual files (except the SPDX file itself, if it is included in the package) that make up each package and that correlates to the data in this SPDX file 488 "version": "A String", # Identify the version of the package 489 }, 490 "spdxRelationship": { # RelationshipNote represents an SPDX Relationship section: https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ # A note describing an SPDX File. 491 "type": "A String", # The type of relationship between the source and target SPDX elements 492 }, 493 "updateTime": "A String", # Output only. The time this note was last updated. This field can be used as a filter in list requests. 494 "vulnerability": { # Vulnerability provides metadata about a security vulnerability in a Note. # A note describing a package vulnerability. 495 "cvssScore": 3.14, # The CVSS score for this vulnerability. 496 "cvssV3": { # Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document # The full description of the CVSSv3. 497 "attackComplexity": "A String", 498 "attackVector": "A String", # Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. 499 "availabilityImpact": "A String", 500 "baseScore": 3.14, # The base score is a function of the base metric scores. 501 "confidentialityImpact": "A String", 502 "exploitabilityScore": 3.14, 503 "impactScore": 3.14, 504 "integrityImpact": "A String", 505 "privilegesRequired": "A String", 506 "scope": "A String", 507 "userInteraction": "A String", 508 }, 509 "details": [ # All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. 510 { # Identifies all appearances of this vulnerability in the package for a specific distro/location. For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 511 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 512 "description": "A String", # A vendor-specific description of this note. 513 "fixedLocation": { # The location of the vulnerability. # The fix for this specific package version. 514 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar. 515 "package": "A String", # Required. The package being described. 516 "version": { # Version contains structured information about the version of a package. # Required. The version of the package being described. 517 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 518 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 519 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 520 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 521 "revision": "A String", # The iteration of the package build from the above version. 522 }, 523 }, 524 "isObsolete": True or False, # Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. 525 "maxAffectedVersion": { # Version contains structured information about the version of a package. # The max version of the package in which the vulnerability exists. 526 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 527 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 528 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 529 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 530 "revision": "A String", # The iteration of the package build from the above version. 531 }, 532 "minAffectedVersion": { # Version contains structured information about the version of a package. # The min version of the package in which the vulnerability exists. 533 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 534 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 535 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 536 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 537 "revision": "A String", # The iteration of the package build from the above version. 538 }, 539 "package": "A String", # Required. The name of the package where the vulnerability was found. 540 "packageType": "A String", # The type of package; whether native or non native(ruby gems, node.js packages etc). 541 "severityName": "A String", # The severity (eg: distro assigned severity) for this vulnerability. 542 "source": "A String", # The source from which the information in this Detail was obtained. 543 "sourceUpdateTime": "A String", # 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. 544 "vendor": "A String", # The name of the vendor of the product. 545 }, 546 ], 547 "severity": "A String", # Note provider assigned impact of the vulnerability. 548 "sourceUpdateTime": "A String", # 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. 549 "windowsDetails": [ # 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. 550 { 551 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 552 "description": "A String", # The description of the vulnerability. 553 "fixingKbs": [ # Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix. 554 { 555 "name": "A String", # The KB name (generally of the form KB[0-9]+ i.e. KB123456). 556 "url": "A String", # A link to the KB in the Windows update catalog - https://www.catalog.update.microsoft.com/ 557 }, 558 ], 559 "name": "A String", # Required. The name of the vulnerability. 560 }, 561 ], 562 }, 563 }, 564 ], 565}</pre> 566</div> 567 568<div class="method"> 569 <code class="details" id="close">close()</code> 570 <pre>Close httplib2 connections.</pre> 571</div> 572 573<div class="method"> 574 <code class="details" id="create">create(parent, body=None, noteId=None, x__xgafv=None)</code> 575 <pre>Creates a new note. 576 577Args: 578 parent: string, Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the note is to be created. (required) 579 body: object, The request body. 580 The object takes the form of: 581 582{ # A type of analysis that can be done for a resource. 583 "attestationAuthority": { # Note kind that represents a logical attestation "role" or "authority". For example, an organization might have one `Authority` for "QA" and one for "build". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project. # A note describing an attestation role. 584 "hint": { # This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from "readable" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify. # Hint hints at the purpose of the attestation authority. 585 "humanReadableName": "A String", # Required. The human readable name of this attestation authority, for example "qa". 586 }, 587 }, 588 "baseImage": { # Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. # A note describing a base image. 589 "fingerprint": { # A set of properties that uniquely identify a given Docker image. # Required. Immutable. The fingerprint of the base image. 590 "v1Name": "A String", # Required. The layer ID of the final layer in the Docker image's v1 representation. 591 "v2Blob": [ # Required. The ordered list of v2 blobs that represent a given image. 592 "A String", 593 ], 594 "v2Name": "A String", # Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the final blob is kept. 595 }, 596 "resourceUrl": "A String", # Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images. 597 }, 598 "build": { # Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence. # A note describing build provenance for a verifiable build. 599 "builderVersion": "A String", # Required. Immutable. Version of the builder which produced this build. 600 "signature": { # Message encapsulating the signature of the verified build. # Signature of the build in occurrences pointing to this build note containing build details. 601 "keyId": "A String", # An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service). 602 "keyType": "A String", # The type of the key, either stored in `public_key` or referenced in `key_id`. 603 "publicKey": "A String", # Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys. This field may be empty if `key_id` references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 604 "signature": "A String", # Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded. 605 }, 606 }, 607 "createTime": "A String", # Output only. The time this note was created. This field can be used as a filter in list requests. 608 "deployable": { # An artifact that can be deployed in some runtime. # A note describing something that can be deployed. 609 "resourceUri": [ # Required. Resource URI for the artifact being deployed. 610 "A String", 611 ], 612 }, 613 "discovery": { # A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis. # A note describing the initial analysis of a resource. 614 "analysisKind": "A String", # Required. Immutable. The kind of analysis that is handled by this discovery. 615 }, 616 "expirationTime": "A String", # Time of expiration for this note. Empty if note does not expire. 617 "intoto": { # This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note. # A note describing an in-toto link. 618 "expectedCommand": [ # This field contains the expected command used to perform the step. 619 "A String", 620 ], 621 "expectedMaterials": [ # The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. 622 { # Defines an object to declare an in-toto artifact rule 623 "artifactRule": [ 624 "A String", 625 ], 626 }, 627 ], 628 "expectedProducts": [ 629 { # Defines an object to declare an in-toto artifact rule 630 "artifactRule": [ 631 "A String", 632 ], 633 }, 634 ], 635 "signingKeys": [ # This field contains the public keys that can be used to verify the signatures on the step metadata. 636 { # This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { "key_id": "776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...", "key_type": "rsa", "public_key_value": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0B...", "key_scheme": "rsassa-pss-sha256" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification. 637 "keyId": "A String", # key_id is an identifier for the signing key. 638 "keyScheme": "A String", # This field contains the corresponding signature scheme. Eg: "rsassa-pss-sha256". 639 "keyType": "A String", # This field identifies the specific signing method. Eg: "rsa", "ed25519", and "ecdsa". 640 "publicKeyValue": "A String", # This field contains the actual public key. 641 }, 642 ], 643 "stepName": "A String", # This field identifies the name of the step in the supply chain. 644 "threshold": "A String", # This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. 645 }, 646 "kind": "A String", # Output only. The type of analysis. This field can be used as a filter in list requests. 647 "longDescription": "A String", # A detailed description of this note. 648 "name": "A String", # Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 649 "package": { # This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions. # A note describing a package hosted by various package managers. 650 "distribution": [ # The various channels by which a package is distributed. 651 { # This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror. 652 "architecture": "A String", # The CPU architecture for which packages in this distribution channel were built. 653 "cpeUri": "A String", # Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. 654 "description": "A String", # The distribution channel-specific description of this package. 655 "latestVersion": { # Version contains structured information about the version of a package. # The latest available version of this package in this distribution channel. 656 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 657 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 658 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 659 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 660 "revision": "A String", # The iteration of the package build from the above version. 661 }, 662 "maintainer": "A String", # A freeform string denoting the maintainer of this package. 663 "url": "A String", # The distribution channel-specific homepage for this package. 664 }, 665 ], 666 "name": "A String", # Required. Immutable. The name of the package. 667 }, 668 "relatedNoteNames": [ # Other notes related to this note. 669 "A String", 670 ], 671 "relatedUrl": [ # URLs associated with this note. 672 { # Metadata for any related URL information. 673 "label": "A String", # Label to describe usage of the URL. 674 "url": "A String", # Specific URL associated with the resource. 675 }, 676 ], 677 "sbom": { # DocumentNote represents an SPDX Document Creation Infromation section: https://spdx.github.io/spdx-spec/2-document-creation-information/ # A note describing a software bill of materials. 678 "dataLicence": "A String", # Compliance with the SPDX specification includes populating the SPDX fields therein with data related to such fields ("SPDX-Metadata") 679 "spdxVersion": "A String", # Provide a reference number that can be used to understand how to parse and interpret the rest of the file 680 }, 681 "shortDescription": "A String", # A one sentence description of this note. 682 "spdxFile": { # FileNote represents an SPDX File Information section: https://spdx.github.io/spdx-spec/4-file-information/ # A note describing an SPDX File. 683 "checksum": [ # Provide a unique identifier to match analysis information on each specific file in a package 684 "A String", 685 ], 686 "fileType": "A String", # This field provides information about the type of file identified 687 "title": "A String", # Identify the full path and filename that corresponds to the file information in this section 688 }, 689 "spdxPackage": { # PackageInfoNote represents an SPDX Package Information section: https://spdx.github.io/spdx-spec/3-package-information/ # A note describing an SPDX Package. 690 "analyzed": True or False, # Indicates whether the file content of this package has been available for or subjected to analysis when creating the SPDX document 691 "attribution": "A String", # A place for the SPDX data creator to record, at the package level, acknowledgements that may be needed to be communicated in some contexts 692 "checksum": "A String", # Provide an independently reproducible mechanism that permits unique identification of a specific package that correlates to the data in this SPDX file 693 "copyright": "A String", # Identify the copyright holders of the package, as well as any dates present 694 "detailedDescription": "A String", # A more detailed description of the package 695 "downloadLocation": "A String", # This section identifies the download Universal Resource Locator (URL), or a specific location within a version control system (VCS) for the package at the time that the SPDX file was created 696 "externalRefs": [ # ExternalRef 697 { # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 698 "category": "A String", # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 699 "comment": "A String", # Human-readable information about the purpose and target of the reference 700 "locator": "A String", # The unique string with no spaces necessary to access the package-specific information, metadata, or content within the target location 701 "type": "A String", # Type of category (e.g. 'npm' for the PACKAGE_MANAGER category) 702 }, 703 ], 704 "filesLicenseInfo": [ # Contain the license the SPDX file creator has concluded as governing the This field is to contain a list of all licenses found in the package. The relationship between licenses (i.e., conjunctive, disjunctive) is not specified in this field – it is simply a listing of all licenses found 705 "A String", 706 ], 707 "homePage": "A String", # Provide a place for the SPDX file creator to record a web site that serves as the package's home page 708 "licenseDeclared": { # License information: https://spdx.github.io/spdx-spec/3-package-information/#315-declared-license # List the licenses that have been declared by the authors of the package 709 "comments": "A String", # Comments 710 "expression": "A String", # Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/ 711 }, 712 "originator": "A String", # If the package identified in the SPDX file originated from a different person or organization than identified as Package Supplier, this field identifies from where or whom the package originally came 713 "packageType": "A String", # The type of package: OS, MAVEN, GO, GO_STDLIB, etc. 714 "summaryDescription": "A String", # A short description of the package 715 "supplier": "A String", # Identify the actual distribution source for the package/directory identified in the SPDX file 716 "title": "A String", # Identify the full name of the package as given by the Package Originator 717 "verificationCode": "A String", # This field provides an independently reproducible mechanism identifying specific contents of a package based on the actual files (except the SPDX file itself, if it is included in the package) that make up each package and that correlates to the data in this SPDX file 718 "version": "A String", # Identify the version of the package 719 }, 720 "spdxRelationship": { # RelationshipNote represents an SPDX Relationship section: https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ # A note describing an SPDX File. 721 "type": "A String", # The type of relationship between the source and target SPDX elements 722 }, 723 "updateTime": "A String", # Output only. The time this note was last updated. This field can be used as a filter in list requests. 724 "vulnerability": { # Vulnerability provides metadata about a security vulnerability in a Note. # A note describing a package vulnerability. 725 "cvssScore": 3.14, # The CVSS score for this vulnerability. 726 "cvssV3": { # Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document # The full description of the CVSSv3. 727 "attackComplexity": "A String", 728 "attackVector": "A String", # Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. 729 "availabilityImpact": "A String", 730 "baseScore": 3.14, # The base score is a function of the base metric scores. 731 "confidentialityImpact": "A String", 732 "exploitabilityScore": 3.14, 733 "impactScore": 3.14, 734 "integrityImpact": "A String", 735 "privilegesRequired": "A String", 736 "scope": "A String", 737 "userInteraction": "A String", 738 }, 739 "details": [ # All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. 740 { # Identifies all appearances of this vulnerability in the package for a specific distro/location. For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 741 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 742 "description": "A String", # A vendor-specific description of this note. 743 "fixedLocation": { # The location of the vulnerability. # The fix for this specific package version. 744 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar. 745 "package": "A String", # Required. The package being described. 746 "version": { # Version contains structured information about the version of a package. # Required. The version of the package being described. 747 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 748 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 749 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 750 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 751 "revision": "A String", # The iteration of the package build from the above version. 752 }, 753 }, 754 "isObsolete": True or False, # Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. 755 "maxAffectedVersion": { # Version contains structured information about the version of a package. # The max version of the package in which the vulnerability exists. 756 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 757 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 758 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 759 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 760 "revision": "A String", # The iteration of the package build from the above version. 761 }, 762 "minAffectedVersion": { # Version contains structured information about the version of a package. # The min version of the package in which the vulnerability exists. 763 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 764 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 765 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 766 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 767 "revision": "A String", # The iteration of the package build from the above version. 768 }, 769 "package": "A String", # Required. The name of the package where the vulnerability was found. 770 "packageType": "A String", # The type of package; whether native or non native(ruby gems, node.js packages etc). 771 "severityName": "A String", # The severity (eg: distro assigned severity) for this vulnerability. 772 "source": "A String", # The source from which the information in this Detail was obtained. 773 "sourceUpdateTime": "A String", # 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. 774 "vendor": "A String", # The name of the vendor of the product. 775 }, 776 ], 777 "severity": "A String", # Note provider assigned impact of the vulnerability. 778 "sourceUpdateTime": "A String", # 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. 779 "windowsDetails": [ # 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. 780 { 781 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 782 "description": "A String", # The description of the vulnerability. 783 "fixingKbs": [ # Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix. 784 { 785 "name": "A String", # The KB name (generally of the form KB[0-9]+ i.e. KB123456). 786 "url": "A String", # A link to the KB in the Windows update catalog - https://www.catalog.update.microsoft.com/ 787 }, 788 ], 789 "name": "A String", # Required. The name of the vulnerability. 790 }, 791 ], 792 }, 793} 794 795 noteId: string, Required. The ID to use for this note. 796 x__xgafv: string, V1 error format. 797 Allowed values 798 1 - v1 error format 799 2 - v2 error format 800 801Returns: 802 An object of the form: 803 804 { # A type of analysis that can be done for a resource. 805 "attestationAuthority": { # Note kind that represents a logical attestation "role" or "authority". For example, an organization might have one `Authority` for "QA" and one for "build". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project. # A note describing an attestation role. 806 "hint": { # This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from "readable" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify. # Hint hints at the purpose of the attestation authority. 807 "humanReadableName": "A String", # Required. The human readable name of this attestation authority, for example "qa". 808 }, 809 }, 810 "baseImage": { # Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. # A note describing a base image. 811 "fingerprint": { # A set of properties that uniquely identify a given Docker image. # Required. Immutable. The fingerprint of the base image. 812 "v1Name": "A String", # Required. The layer ID of the final layer in the Docker image's v1 representation. 813 "v2Blob": [ # Required. The ordered list of v2 blobs that represent a given image. 814 "A String", 815 ], 816 "v2Name": "A String", # Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the final blob is kept. 817 }, 818 "resourceUrl": "A String", # Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images. 819 }, 820 "build": { # Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence. # A note describing build provenance for a verifiable build. 821 "builderVersion": "A String", # Required. Immutable. Version of the builder which produced this build. 822 "signature": { # Message encapsulating the signature of the verified build. # Signature of the build in occurrences pointing to this build note containing build details. 823 "keyId": "A String", # An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service). 824 "keyType": "A String", # The type of the key, either stored in `public_key` or referenced in `key_id`. 825 "publicKey": "A String", # Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys. This field may be empty if `key_id` references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 826 "signature": "A String", # Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded. 827 }, 828 }, 829 "createTime": "A String", # Output only. The time this note was created. This field can be used as a filter in list requests. 830 "deployable": { # An artifact that can be deployed in some runtime. # A note describing something that can be deployed. 831 "resourceUri": [ # Required. Resource URI for the artifact being deployed. 832 "A String", 833 ], 834 }, 835 "discovery": { # A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis. # A note describing the initial analysis of a resource. 836 "analysisKind": "A String", # Required. Immutable. The kind of analysis that is handled by this discovery. 837 }, 838 "expirationTime": "A String", # Time of expiration for this note. Empty if note does not expire. 839 "intoto": { # This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note. # A note describing an in-toto link. 840 "expectedCommand": [ # This field contains the expected command used to perform the step. 841 "A String", 842 ], 843 "expectedMaterials": [ # The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. 844 { # Defines an object to declare an in-toto artifact rule 845 "artifactRule": [ 846 "A String", 847 ], 848 }, 849 ], 850 "expectedProducts": [ 851 { # Defines an object to declare an in-toto artifact rule 852 "artifactRule": [ 853 "A String", 854 ], 855 }, 856 ], 857 "signingKeys": [ # This field contains the public keys that can be used to verify the signatures on the step metadata. 858 { # This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { "key_id": "776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...", "key_type": "rsa", "public_key_value": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0B...", "key_scheme": "rsassa-pss-sha256" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification. 859 "keyId": "A String", # key_id is an identifier for the signing key. 860 "keyScheme": "A String", # This field contains the corresponding signature scheme. Eg: "rsassa-pss-sha256". 861 "keyType": "A String", # This field identifies the specific signing method. Eg: "rsa", "ed25519", and "ecdsa". 862 "publicKeyValue": "A String", # This field contains the actual public key. 863 }, 864 ], 865 "stepName": "A String", # This field identifies the name of the step in the supply chain. 866 "threshold": "A String", # This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. 867 }, 868 "kind": "A String", # Output only. The type of analysis. This field can be used as a filter in list requests. 869 "longDescription": "A String", # A detailed description of this note. 870 "name": "A String", # Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 871 "package": { # This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions. # A note describing a package hosted by various package managers. 872 "distribution": [ # The various channels by which a package is distributed. 873 { # This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror. 874 "architecture": "A String", # The CPU architecture for which packages in this distribution channel were built. 875 "cpeUri": "A String", # Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. 876 "description": "A String", # The distribution channel-specific description of this package. 877 "latestVersion": { # Version contains structured information about the version of a package. # The latest available version of this package in this distribution channel. 878 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 879 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 880 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 881 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 882 "revision": "A String", # The iteration of the package build from the above version. 883 }, 884 "maintainer": "A String", # A freeform string denoting the maintainer of this package. 885 "url": "A String", # The distribution channel-specific homepage for this package. 886 }, 887 ], 888 "name": "A String", # Required. Immutable. The name of the package. 889 }, 890 "relatedNoteNames": [ # Other notes related to this note. 891 "A String", 892 ], 893 "relatedUrl": [ # URLs associated with this note. 894 { # Metadata for any related URL information. 895 "label": "A String", # Label to describe usage of the URL. 896 "url": "A String", # Specific URL associated with the resource. 897 }, 898 ], 899 "sbom": { # DocumentNote represents an SPDX Document Creation Infromation section: https://spdx.github.io/spdx-spec/2-document-creation-information/ # A note describing a software bill of materials. 900 "dataLicence": "A String", # Compliance with the SPDX specification includes populating the SPDX fields therein with data related to such fields ("SPDX-Metadata") 901 "spdxVersion": "A String", # Provide a reference number that can be used to understand how to parse and interpret the rest of the file 902 }, 903 "shortDescription": "A String", # A one sentence description of this note. 904 "spdxFile": { # FileNote represents an SPDX File Information section: https://spdx.github.io/spdx-spec/4-file-information/ # A note describing an SPDX File. 905 "checksum": [ # Provide a unique identifier to match analysis information on each specific file in a package 906 "A String", 907 ], 908 "fileType": "A String", # This field provides information about the type of file identified 909 "title": "A String", # Identify the full path and filename that corresponds to the file information in this section 910 }, 911 "spdxPackage": { # PackageInfoNote represents an SPDX Package Information section: https://spdx.github.io/spdx-spec/3-package-information/ # A note describing an SPDX Package. 912 "analyzed": True or False, # Indicates whether the file content of this package has been available for or subjected to analysis when creating the SPDX document 913 "attribution": "A String", # A place for the SPDX data creator to record, at the package level, acknowledgements that may be needed to be communicated in some contexts 914 "checksum": "A String", # Provide an independently reproducible mechanism that permits unique identification of a specific package that correlates to the data in this SPDX file 915 "copyright": "A String", # Identify the copyright holders of the package, as well as any dates present 916 "detailedDescription": "A String", # A more detailed description of the package 917 "downloadLocation": "A String", # This section identifies the download Universal Resource Locator (URL), or a specific location within a version control system (VCS) for the package at the time that the SPDX file was created 918 "externalRefs": [ # ExternalRef 919 { # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 920 "category": "A String", # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 921 "comment": "A String", # Human-readable information about the purpose and target of the reference 922 "locator": "A String", # The unique string with no spaces necessary to access the package-specific information, metadata, or content within the target location 923 "type": "A String", # Type of category (e.g. 'npm' for the PACKAGE_MANAGER category) 924 }, 925 ], 926 "filesLicenseInfo": [ # Contain the license the SPDX file creator has concluded as governing the This field is to contain a list of all licenses found in the package. The relationship between licenses (i.e., conjunctive, disjunctive) is not specified in this field – it is simply a listing of all licenses found 927 "A String", 928 ], 929 "homePage": "A String", # Provide a place for the SPDX file creator to record a web site that serves as the package's home page 930 "licenseDeclared": { # License information: https://spdx.github.io/spdx-spec/3-package-information/#315-declared-license # List the licenses that have been declared by the authors of the package 931 "comments": "A String", # Comments 932 "expression": "A String", # Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/ 933 }, 934 "originator": "A String", # If the package identified in the SPDX file originated from a different person or organization than identified as Package Supplier, this field identifies from where or whom the package originally came 935 "packageType": "A String", # The type of package: OS, MAVEN, GO, GO_STDLIB, etc. 936 "summaryDescription": "A String", # A short description of the package 937 "supplier": "A String", # Identify the actual distribution source for the package/directory identified in the SPDX file 938 "title": "A String", # Identify the full name of the package as given by the Package Originator 939 "verificationCode": "A String", # This field provides an independently reproducible mechanism identifying specific contents of a package based on the actual files (except the SPDX file itself, if it is included in the package) that make up each package and that correlates to the data in this SPDX file 940 "version": "A String", # Identify the version of the package 941 }, 942 "spdxRelationship": { # RelationshipNote represents an SPDX Relationship section: https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ # A note describing an SPDX File. 943 "type": "A String", # The type of relationship between the source and target SPDX elements 944 }, 945 "updateTime": "A String", # Output only. The time this note was last updated. This field can be used as a filter in list requests. 946 "vulnerability": { # Vulnerability provides metadata about a security vulnerability in a Note. # A note describing a package vulnerability. 947 "cvssScore": 3.14, # The CVSS score for this vulnerability. 948 "cvssV3": { # Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document # The full description of the CVSSv3. 949 "attackComplexity": "A String", 950 "attackVector": "A String", # Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. 951 "availabilityImpact": "A String", 952 "baseScore": 3.14, # The base score is a function of the base metric scores. 953 "confidentialityImpact": "A String", 954 "exploitabilityScore": 3.14, 955 "impactScore": 3.14, 956 "integrityImpact": "A String", 957 "privilegesRequired": "A String", 958 "scope": "A String", 959 "userInteraction": "A String", 960 }, 961 "details": [ # All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. 962 { # Identifies all appearances of this vulnerability in the package for a specific distro/location. For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 963 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 964 "description": "A String", # A vendor-specific description of this note. 965 "fixedLocation": { # The location of the vulnerability. # The fix for this specific package version. 966 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar. 967 "package": "A String", # Required. The package being described. 968 "version": { # Version contains structured information about the version of a package. # Required. The version of the package being described. 969 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 970 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 971 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 972 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 973 "revision": "A String", # The iteration of the package build from the above version. 974 }, 975 }, 976 "isObsolete": True or False, # Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. 977 "maxAffectedVersion": { # Version contains structured information about the version of a package. # The max version of the package in which the vulnerability exists. 978 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 979 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 980 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 981 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 982 "revision": "A String", # The iteration of the package build from the above version. 983 }, 984 "minAffectedVersion": { # Version contains structured information about the version of a package. # The min version of the package in which the vulnerability exists. 985 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 986 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 987 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 988 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 989 "revision": "A String", # The iteration of the package build from the above version. 990 }, 991 "package": "A String", # Required. The name of the package where the vulnerability was found. 992 "packageType": "A String", # The type of package; whether native or non native(ruby gems, node.js packages etc). 993 "severityName": "A String", # The severity (eg: distro assigned severity) for this vulnerability. 994 "source": "A String", # The source from which the information in this Detail was obtained. 995 "sourceUpdateTime": "A String", # 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. 996 "vendor": "A String", # The name of the vendor of the product. 997 }, 998 ], 999 "severity": "A String", # Note provider assigned impact of the vulnerability. 1000 "sourceUpdateTime": "A String", # 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. 1001 "windowsDetails": [ # 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. 1002 { 1003 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 1004 "description": "A String", # The description of the vulnerability. 1005 "fixingKbs": [ # Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix. 1006 { 1007 "name": "A String", # The KB name (generally of the form KB[0-9]+ i.e. KB123456). 1008 "url": "A String", # A link to the KB in the Windows update catalog - https://www.catalog.update.microsoft.com/ 1009 }, 1010 ], 1011 "name": "A String", # Required. The name of the vulnerability. 1012 }, 1013 ], 1014 }, 1015}</pre> 1016</div> 1017 1018<div class="method"> 1019 <code class="details" id="delete">delete(name, x__xgafv=None)</code> 1020 <pre>Deletes the specified note. 1021 1022Args: 1023 name: string, Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. (required) 1024 x__xgafv: string, V1 error format. 1025 Allowed values 1026 1 - v1 error format 1027 2 - v2 error format 1028 1029Returns: 1030 An object of the form: 1031 1032 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. 1033}</pre> 1034</div> 1035 1036<div class="method"> 1037 <code class="details" id="get">get(name, x__xgafv=None)</code> 1038 <pre>Gets the specified note. 1039 1040Args: 1041 name: string, Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. (required) 1042 x__xgafv: string, V1 error format. 1043 Allowed values 1044 1 - v1 error format 1045 2 - v2 error format 1046 1047Returns: 1048 An object of the form: 1049 1050 { # A type of analysis that can be done for a resource. 1051 "attestationAuthority": { # Note kind that represents a logical attestation "role" or "authority". For example, an organization might have one `Authority` for "QA" and one for "build". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project. # A note describing an attestation role. 1052 "hint": { # This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from "readable" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify. # Hint hints at the purpose of the attestation authority. 1053 "humanReadableName": "A String", # Required. The human readable name of this attestation authority, for example "qa". 1054 }, 1055 }, 1056 "baseImage": { # Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. # A note describing a base image. 1057 "fingerprint": { # A set of properties that uniquely identify a given Docker image. # Required. Immutable. The fingerprint of the base image. 1058 "v1Name": "A String", # Required. The layer ID of the final layer in the Docker image's v1 representation. 1059 "v2Blob": [ # Required. The ordered list of v2 blobs that represent a given image. 1060 "A String", 1061 ], 1062 "v2Name": "A String", # Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the final blob is kept. 1063 }, 1064 "resourceUrl": "A String", # Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images. 1065 }, 1066 "build": { # Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence. # A note describing build provenance for a verifiable build. 1067 "builderVersion": "A String", # Required. Immutable. Version of the builder which produced this build. 1068 "signature": { # Message encapsulating the signature of the verified build. # Signature of the build in occurrences pointing to this build note containing build details. 1069 "keyId": "A String", # An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service). 1070 "keyType": "A String", # The type of the key, either stored in `public_key` or referenced in `key_id`. 1071 "publicKey": "A String", # Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys. This field may be empty if `key_id` references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 1072 "signature": "A String", # Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded. 1073 }, 1074 }, 1075 "createTime": "A String", # Output only. The time this note was created. This field can be used as a filter in list requests. 1076 "deployable": { # An artifact that can be deployed in some runtime. # A note describing something that can be deployed. 1077 "resourceUri": [ # Required. Resource URI for the artifact being deployed. 1078 "A String", 1079 ], 1080 }, 1081 "discovery": { # A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis. # A note describing the initial analysis of a resource. 1082 "analysisKind": "A String", # Required. Immutable. The kind of analysis that is handled by this discovery. 1083 }, 1084 "expirationTime": "A String", # Time of expiration for this note. Empty if note does not expire. 1085 "intoto": { # This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note. # A note describing an in-toto link. 1086 "expectedCommand": [ # This field contains the expected command used to perform the step. 1087 "A String", 1088 ], 1089 "expectedMaterials": [ # The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. 1090 { # Defines an object to declare an in-toto artifact rule 1091 "artifactRule": [ 1092 "A String", 1093 ], 1094 }, 1095 ], 1096 "expectedProducts": [ 1097 { # Defines an object to declare an in-toto artifact rule 1098 "artifactRule": [ 1099 "A String", 1100 ], 1101 }, 1102 ], 1103 "signingKeys": [ # This field contains the public keys that can be used to verify the signatures on the step metadata. 1104 { # This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { "key_id": "776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...", "key_type": "rsa", "public_key_value": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0B...", "key_scheme": "rsassa-pss-sha256" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification. 1105 "keyId": "A String", # key_id is an identifier for the signing key. 1106 "keyScheme": "A String", # This field contains the corresponding signature scheme. Eg: "rsassa-pss-sha256". 1107 "keyType": "A String", # This field identifies the specific signing method. Eg: "rsa", "ed25519", and "ecdsa". 1108 "publicKeyValue": "A String", # This field contains the actual public key. 1109 }, 1110 ], 1111 "stepName": "A String", # This field identifies the name of the step in the supply chain. 1112 "threshold": "A String", # This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. 1113 }, 1114 "kind": "A String", # Output only. The type of analysis. This field can be used as a filter in list requests. 1115 "longDescription": "A String", # A detailed description of this note. 1116 "name": "A String", # Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 1117 "package": { # This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions. # A note describing a package hosted by various package managers. 1118 "distribution": [ # The various channels by which a package is distributed. 1119 { # This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror. 1120 "architecture": "A String", # The CPU architecture for which packages in this distribution channel were built. 1121 "cpeUri": "A String", # Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. 1122 "description": "A String", # The distribution channel-specific description of this package. 1123 "latestVersion": { # Version contains structured information about the version of a package. # The latest available version of this package in this distribution channel. 1124 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1125 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1126 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1127 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1128 "revision": "A String", # The iteration of the package build from the above version. 1129 }, 1130 "maintainer": "A String", # A freeform string denoting the maintainer of this package. 1131 "url": "A String", # The distribution channel-specific homepage for this package. 1132 }, 1133 ], 1134 "name": "A String", # Required. Immutable. The name of the package. 1135 }, 1136 "relatedNoteNames": [ # Other notes related to this note. 1137 "A String", 1138 ], 1139 "relatedUrl": [ # URLs associated with this note. 1140 { # Metadata for any related URL information. 1141 "label": "A String", # Label to describe usage of the URL. 1142 "url": "A String", # Specific URL associated with the resource. 1143 }, 1144 ], 1145 "sbom": { # DocumentNote represents an SPDX Document Creation Infromation section: https://spdx.github.io/spdx-spec/2-document-creation-information/ # A note describing a software bill of materials. 1146 "dataLicence": "A String", # Compliance with the SPDX specification includes populating the SPDX fields therein with data related to such fields ("SPDX-Metadata") 1147 "spdxVersion": "A String", # Provide a reference number that can be used to understand how to parse and interpret the rest of the file 1148 }, 1149 "shortDescription": "A String", # A one sentence description of this note. 1150 "spdxFile": { # FileNote represents an SPDX File Information section: https://spdx.github.io/spdx-spec/4-file-information/ # A note describing an SPDX File. 1151 "checksum": [ # Provide a unique identifier to match analysis information on each specific file in a package 1152 "A String", 1153 ], 1154 "fileType": "A String", # This field provides information about the type of file identified 1155 "title": "A String", # Identify the full path and filename that corresponds to the file information in this section 1156 }, 1157 "spdxPackage": { # PackageInfoNote represents an SPDX Package Information section: https://spdx.github.io/spdx-spec/3-package-information/ # A note describing an SPDX Package. 1158 "analyzed": True or False, # Indicates whether the file content of this package has been available for or subjected to analysis when creating the SPDX document 1159 "attribution": "A String", # A place for the SPDX data creator to record, at the package level, acknowledgements that may be needed to be communicated in some contexts 1160 "checksum": "A String", # Provide an independently reproducible mechanism that permits unique identification of a specific package that correlates to the data in this SPDX file 1161 "copyright": "A String", # Identify the copyright holders of the package, as well as any dates present 1162 "detailedDescription": "A String", # A more detailed description of the package 1163 "downloadLocation": "A String", # This section identifies the download Universal Resource Locator (URL), or a specific location within a version control system (VCS) for the package at the time that the SPDX file was created 1164 "externalRefs": [ # ExternalRef 1165 { # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 1166 "category": "A String", # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 1167 "comment": "A String", # Human-readable information about the purpose and target of the reference 1168 "locator": "A String", # The unique string with no spaces necessary to access the package-specific information, metadata, or content within the target location 1169 "type": "A String", # Type of category (e.g. 'npm' for the PACKAGE_MANAGER category) 1170 }, 1171 ], 1172 "filesLicenseInfo": [ # Contain the license the SPDX file creator has concluded as governing the This field is to contain a list of all licenses found in the package. The relationship between licenses (i.e., conjunctive, disjunctive) is not specified in this field – it is simply a listing of all licenses found 1173 "A String", 1174 ], 1175 "homePage": "A String", # Provide a place for the SPDX file creator to record a web site that serves as the package's home page 1176 "licenseDeclared": { # License information: https://spdx.github.io/spdx-spec/3-package-information/#315-declared-license # List the licenses that have been declared by the authors of the package 1177 "comments": "A String", # Comments 1178 "expression": "A String", # Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/ 1179 }, 1180 "originator": "A String", # If the package identified in the SPDX file originated from a different person or organization than identified as Package Supplier, this field identifies from where or whom the package originally came 1181 "packageType": "A String", # The type of package: OS, MAVEN, GO, GO_STDLIB, etc. 1182 "summaryDescription": "A String", # A short description of the package 1183 "supplier": "A String", # Identify the actual distribution source for the package/directory identified in the SPDX file 1184 "title": "A String", # Identify the full name of the package as given by the Package Originator 1185 "verificationCode": "A String", # This field provides an independently reproducible mechanism identifying specific contents of a package based on the actual files (except the SPDX file itself, if it is included in the package) that make up each package and that correlates to the data in this SPDX file 1186 "version": "A String", # Identify the version of the package 1187 }, 1188 "spdxRelationship": { # RelationshipNote represents an SPDX Relationship section: https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ # A note describing an SPDX File. 1189 "type": "A String", # The type of relationship between the source and target SPDX elements 1190 }, 1191 "updateTime": "A String", # Output only. The time this note was last updated. This field can be used as a filter in list requests. 1192 "vulnerability": { # Vulnerability provides metadata about a security vulnerability in a Note. # A note describing a package vulnerability. 1193 "cvssScore": 3.14, # The CVSS score for this vulnerability. 1194 "cvssV3": { # Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document # The full description of the CVSSv3. 1195 "attackComplexity": "A String", 1196 "attackVector": "A String", # Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. 1197 "availabilityImpact": "A String", 1198 "baseScore": 3.14, # The base score is a function of the base metric scores. 1199 "confidentialityImpact": "A String", 1200 "exploitabilityScore": 3.14, 1201 "impactScore": 3.14, 1202 "integrityImpact": "A String", 1203 "privilegesRequired": "A String", 1204 "scope": "A String", 1205 "userInteraction": "A String", 1206 }, 1207 "details": [ # All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. 1208 { # Identifies all appearances of this vulnerability in the package for a specific distro/location. For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 1209 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 1210 "description": "A String", # A vendor-specific description of this note. 1211 "fixedLocation": { # The location of the vulnerability. # The fix for this specific package version. 1212 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar. 1213 "package": "A String", # Required. The package being described. 1214 "version": { # Version contains structured information about the version of a package. # Required. The version of the package being described. 1215 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1216 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1217 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1218 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1219 "revision": "A String", # The iteration of the package build from the above version. 1220 }, 1221 }, 1222 "isObsolete": True or False, # Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. 1223 "maxAffectedVersion": { # Version contains structured information about the version of a package. # The max version of the package in which the vulnerability exists. 1224 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1225 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1226 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1227 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1228 "revision": "A String", # The iteration of the package build from the above version. 1229 }, 1230 "minAffectedVersion": { # Version contains structured information about the version of a package. # The min version of the package in which the vulnerability exists. 1231 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1232 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1233 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1234 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1235 "revision": "A String", # The iteration of the package build from the above version. 1236 }, 1237 "package": "A String", # Required. The name of the package where the vulnerability was found. 1238 "packageType": "A String", # The type of package; whether native or non native(ruby gems, node.js packages etc). 1239 "severityName": "A String", # The severity (eg: distro assigned severity) for this vulnerability. 1240 "source": "A String", # The source from which the information in this Detail was obtained. 1241 "sourceUpdateTime": "A String", # 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. 1242 "vendor": "A String", # The name of the vendor of the product. 1243 }, 1244 ], 1245 "severity": "A String", # Note provider assigned impact of the vulnerability. 1246 "sourceUpdateTime": "A String", # 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. 1247 "windowsDetails": [ # 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. 1248 { 1249 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 1250 "description": "A String", # The description of the vulnerability. 1251 "fixingKbs": [ # Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix. 1252 { 1253 "name": "A String", # The KB name (generally of the form KB[0-9]+ i.e. KB123456). 1254 "url": "A String", # A link to the KB in the Windows update catalog - https://www.catalog.update.microsoft.com/ 1255 }, 1256 ], 1257 "name": "A String", # Required. The name of the vulnerability. 1258 }, 1259 ], 1260 }, 1261}</pre> 1262</div> 1263 1264<div class="method"> 1265 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code> 1266 <pre>Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. 1267 1268Args: 1269 resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required) 1270 body: object, The request body. 1271 The object takes the form of: 1272 1273{ # Request message for `GetIamPolicy` method. 1274 "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`. 1275 "requestedPolicyVersion": 42, # Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1276 }, 1277} 1278 1279 x__xgafv: string, V1 error format. 1280 Allowed values 1281 1 - v1 error format 1282 2 - v2 error format 1283 1284Returns: 1285 An object of the form: 1286 1287 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). 1288 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 1289 { # Associates `members`, or principals, with a `role`. 1290 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1291 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1292 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1293 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1294 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 1295 }, 1296 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1297 "A String", 1298 ], 1299 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1300 }, 1301 ], 1302 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 1303 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1304}</pre> 1305</div> 1306 1307<div class="method"> 1308 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code> 1309 <pre>Lists notes for the specified project. 1310 1311Args: 1312 parent: string, Required. The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. (required) 1313 filter: string, The filter expression. 1314 pageSize: integer, Number of notes to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. 1315 pageToken: string, Token to provide to skip to a particular spot in the list. 1316 x__xgafv: string, V1 error format. 1317 Allowed values 1318 1 - v1 error format 1319 2 - v2 error format 1320 1321Returns: 1322 An object of the form: 1323 1324 { # Response for listing notes. 1325 "nextPageToken": "A String", # The next pagination token in the list response. It should be used as `page_token` for the following request. An empty value means no more results. 1326 "notes": [ # The notes requested. 1327 { # A type of analysis that can be done for a resource. 1328 "attestationAuthority": { # Note kind that represents a logical attestation "role" or "authority". For example, an organization might have one `Authority` for "QA" and one for "build". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project. # A note describing an attestation role. 1329 "hint": { # This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from "readable" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify. # Hint hints at the purpose of the attestation authority. 1330 "humanReadableName": "A String", # Required. The human readable name of this attestation authority, for example "qa". 1331 }, 1332 }, 1333 "baseImage": { # Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. # A note describing a base image. 1334 "fingerprint": { # A set of properties that uniquely identify a given Docker image. # Required. Immutable. The fingerprint of the base image. 1335 "v1Name": "A String", # Required. The layer ID of the final layer in the Docker image's v1 representation. 1336 "v2Blob": [ # Required. The ordered list of v2 blobs that represent a given image. 1337 "A String", 1338 ], 1339 "v2Name": "A String", # Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the final blob is kept. 1340 }, 1341 "resourceUrl": "A String", # Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images. 1342 }, 1343 "build": { # Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence. # A note describing build provenance for a verifiable build. 1344 "builderVersion": "A String", # Required. Immutable. Version of the builder which produced this build. 1345 "signature": { # Message encapsulating the signature of the verified build. # Signature of the build in occurrences pointing to this build note containing build details. 1346 "keyId": "A String", # An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service). 1347 "keyType": "A String", # The type of the key, either stored in `public_key` or referenced in `key_id`. 1348 "publicKey": "A String", # Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys. This field may be empty if `key_id` references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 1349 "signature": "A String", # Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded. 1350 }, 1351 }, 1352 "createTime": "A String", # Output only. The time this note was created. This field can be used as a filter in list requests. 1353 "deployable": { # An artifact that can be deployed in some runtime. # A note describing something that can be deployed. 1354 "resourceUri": [ # Required. Resource URI for the artifact being deployed. 1355 "A String", 1356 ], 1357 }, 1358 "discovery": { # A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis. # A note describing the initial analysis of a resource. 1359 "analysisKind": "A String", # Required. Immutable. The kind of analysis that is handled by this discovery. 1360 }, 1361 "expirationTime": "A String", # Time of expiration for this note. Empty if note does not expire. 1362 "intoto": { # This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note. # A note describing an in-toto link. 1363 "expectedCommand": [ # This field contains the expected command used to perform the step. 1364 "A String", 1365 ], 1366 "expectedMaterials": [ # The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. 1367 { # Defines an object to declare an in-toto artifact rule 1368 "artifactRule": [ 1369 "A String", 1370 ], 1371 }, 1372 ], 1373 "expectedProducts": [ 1374 { # Defines an object to declare an in-toto artifact rule 1375 "artifactRule": [ 1376 "A String", 1377 ], 1378 }, 1379 ], 1380 "signingKeys": [ # This field contains the public keys that can be used to verify the signatures on the step metadata. 1381 { # This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { "key_id": "776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...", "key_type": "rsa", "public_key_value": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0B...", "key_scheme": "rsassa-pss-sha256" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification. 1382 "keyId": "A String", # key_id is an identifier for the signing key. 1383 "keyScheme": "A String", # This field contains the corresponding signature scheme. Eg: "rsassa-pss-sha256". 1384 "keyType": "A String", # This field identifies the specific signing method. Eg: "rsa", "ed25519", and "ecdsa". 1385 "publicKeyValue": "A String", # This field contains the actual public key. 1386 }, 1387 ], 1388 "stepName": "A String", # This field identifies the name of the step in the supply chain. 1389 "threshold": "A String", # This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. 1390 }, 1391 "kind": "A String", # Output only. The type of analysis. This field can be used as a filter in list requests. 1392 "longDescription": "A String", # A detailed description of this note. 1393 "name": "A String", # Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 1394 "package": { # This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions. # A note describing a package hosted by various package managers. 1395 "distribution": [ # The various channels by which a package is distributed. 1396 { # This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror. 1397 "architecture": "A String", # The CPU architecture for which packages in this distribution channel were built. 1398 "cpeUri": "A String", # Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. 1399 "description": "A String", # The distribution channel-specific description of this package. 1400 "latestVersion": { # Version contains structured information about the version of a package. # The latest available version of this package in this distribution channel. 1401 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1402 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1403 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1404 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1405 "revision": "A String", # The iteration of the package build from the above version. 1406 }, 1407 "maintainer": "A String", # A freeform string denoting the maintainer of this package. 1408 "url": "A String", # The distribution channel-specific homepage for this package. 1409 }, 1410 ], 1411 "name": "A String", # Required. Immutable. The name of the package. 1412 }, 1413 "relatedNoteNames": [ # Other notes related to this note. 1414 "A String", 1415 ], 1416 "relatedUrl": [ # URLs associated with this note. 1417 { # Metadata for any related URL information. 1418 "label": "A String", # Label to describe usage of the URL. 1419 "url": "A String", # Specific URL associated with the resource. 1420 }, 1421 ], 1422 "sbom": { # DocumentNote represents an SPDX Document Creation Infromation section: https://spdx.github.io/spdx-spec/2-document-creation-information/ # A note describing a software bill of materials. 1423 "dataLicence": "A String", # Compliance with the SPDX specification includes populating the SPDX fields therein with data related to such fields ("SPDX-Metadata") 1424 "spdxVersion": "A String", # Provide a reference number that can be used to understand how to parse and interpret the rest of the file 1425 }, 1426 "shortDescription": "A String", # A one sentence description of this note. 1427 "spdxFile": { # FileNote represents an SPDX File Information section: https://spdx.github.io/spdx-spec/4-file-information/ # A note describing an SPDX File. 1428 "checksum": [ # Provide a unique identifier to match analysis information on each specific file in a package 1429 "A String", 1430 ], 1431 "fileType": "A String", # This field provides information about the type of file identified 1432 "title": "A String", # Identify the full path and filename that corresponds to the file information in this section 1433 }, 1434 "spdxPackage": { # PackageInfoNote represents an SPDX Package Information section: https://spdx.github.io/spdx-spec/3-package-information/ # A note describing an SPDX Package. 1435 "analyzed": True or False, # Indicates whether the file content of this package has been available for or subjected to analysis when creating the SPDX document 1436 "attribution": "A String", # A place for the SPDX data creator to record, at the package level, acknowledgements that may be needed to be communicated in some contexts 1437 "checksum": "A String", # Provide an independently reproducible mechanism that permits unique identification of a specific package that correlates to the data in this SPDX file 1438 "copyright": "A String", # Identify the copyright holders of the package, as well as any dates present 1439 "detailedDescription": "A String", # A more detailed description of the package 1440 "downloadLocation": "A String", # This section identifies the download Universal Resource Locator (URL), or a specific location within a version control system (VCS) for the package at the time that the SPDX file was created 1441 "externalRefs": [ # ExternalRef 1442 { # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 1443 "category": "A String", # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 1444 "comment": "A String", # Human-readable information about the purpose and target of the reference 1445 "locator": "A String", # The unique string with no spaces necessary to access the package-specific information, metadata, or content within the target location 1446 "type": "A String", # Type of category (e.g. 'npm' for the PACKAGE_MANAGER category) 1447 }, 1448 ], 1449 "filesLicenseInfo": [ # Contain the license the SPDX file creator has concluded as governing the This field is to contain a list of all licenses found in the package. The relationship between licenses (i.e., conjunctive, disjunctive) is not specified in this field – it is simply a listing of all licenses found 1450 "A String", 1451 ], 1452 "homePage": "A String", # Provide a place for the SPDX file creator to record a web site that serves as the package's home page 1453 "licenseDeclared": { # License information: https://spdx.github.io/spdx-spec/3-package-information/#315-declared-license # List the licenses that have been declared by the authors of the package 1454 "comments": "A String", # Comments 1455 "expression": "A String", # Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/ 1456 }, 1457 "originator": "A String", # If the package identified in the SPDX file originated from a different person or organization than identified as Package Supplier, this field identifies from where or whom the package originally came 1458 "packageType": "A String", # The type of package: OS, MAVEN, GO, GO_STDLIB, etc. 1459 "summaryDescription": "A String", # A short description of the package 1460 "supplier": "A String", # Identify the actual distribution source for the package/directory identified in the SPDX file 1461 "title": "A String", # Identify the full name of the package as given by the Package Originator 1462 "verificationCode": "A String", # This field provides an independently reproducible mechanism identifying specific contents of a package based on the actual files (except the SPDX file itself, if it is included in the package) that make up each package and that correlates to the data in this SPDX file 1463 "version": "A String", # Identify the version of the package 1464 }, 1465 "spdxRelationship": { # RelationshipNote represents an SPDX Relationship section: https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ # A note describing an SPDX File. 1466 "type": "A String", # The type of relationship between the source and target SPDX elements 1467 }, 1468 "updateTime": "A String", # Output only. The time this note was last updated. This field can be used as a filter in list requests. 1469 "vulnerability": { # Vulnerability provides metadata about a security vulnerability in a Note. # A note describing a package vulnerability. 1470 "cvssScore": 3.14, # The CVSS score for this vulnerability. 1471 "cvssV3": { # Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document # The full description of the CVSSv3. 1472 "attackComplexity": "A String", 1473 "attackVector": "A String", # Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. 1474 "availabilityImpact": "A String", 1475 "baseScore": 3.14, # The base score is a function of the base metric scores. 1476 "confidentialityImpact": "A String", 1477 "exploitabilityScore": 3.14, 1478 "impactScore": 3.14, 1479 "integrityImpact": "A String", 1480 "privilegesRequired": "A String", 1481 "scope": "A String", 1482 "userInteraction": "A String", 1483 }, 1484 "details": [ # All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. 1485 { # Identifies all appearances of this vulnerability in the package for a specific distro/location. For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 1486 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 1487 "description": "A String", # A vendor-specific description of this note. 1488 "fixedLocation": { # The location of the vulnerability. # The fix for this specific package version. 1489 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar. 1490 "package": "A String", # Required. The package being described. 1491 "version": { # Version contains structured information about the version of a package. # Required. The version of the package being described. 1492 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1493 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1494 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1495 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1496 "revision": "A String", # The iteration of the package build from the above version. 1497 }, 1498 }, 1499 "isObsolete": True or False, # Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. 1500 "maxAffectedVersion": { # Version contains structured information about the version of a package. # The max version of the package in which the vulnerability exists. 1501 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1502 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1503 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1504 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1505 "revision": "A String", # The iteration of the package build from the above version. 1506 }, 1507 "minAffectedVersion": { # Version contains structured information about the version of a package. # The min version of the package in which the vulnerability exists. 1508 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1509 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1510 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1511 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1512 "revision": "A String", # The iteration of the package build from the above version. 1513 }, 1514 "package": "A String", # Required. The name of the package where the vulnerability was found. 1515 "packageType": "A String", # The type of package; whether native or non native(ruby gems, node.js packages etc). 1516 "severityName": "A String", # The severity (eg: distro assigned severity) for this vulnerability. 1517 "source": "A String", # The source from which the information in this Detail was obtained. 1518 "sourceUpdateTime": "A String", # 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. 1519 "vendor": "A String", # The name of the vendor of the product. 1520 }, 1521 ], 1522 "severity": "A String", # Note provider assigned impact of the vulnerability. 1523 "sourceUpdateTime": "A String", # 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. 1524 "windowsDetails": [ # 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. 1525 { 1526 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 1527 "description": "A String", # The description of the vulnerability. 1528 "fixingKbs": [ # Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix. 1529 { 1530 "name": "A String", # The KB name (generally of the form KB[0-9]+ i.e. KB123456). 1531 "url": "A String", # A link to the KB in the Windows update catalog - https://www.catalog.update.microsoft.com/ 1532 }, 1533 ], 1534 "name": "A String", # Required. The name of the vulnerability. 1535 }, 1536 ], 1537 }, 1538 }, 1539 ], 1540}</pre> 1541</div> 1542 1543<div class="method"> 1544 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 1545 <pre>Retrieves the next page of results. 1546 1547Args: 1548 previous_request: The request for the previous page. (required) 1549 previous_response: The response from the request for the previous page. (required) 1550 1551Returns: 1552 A request object that you can call 'execute()' on to request the next 1553 page. Returns None if there are no more items in the collection. 1554 </pre> 1555</div> 1556 1557<div class="method"> 1558 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> 1559 <pre>Updates the specified note. 1560 1561Args: 1562 name: string, Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. (required) 1563 body: object, The request body. 1564 The object takes the form of: 1565 1566{ # A type of analysis that can be done for a resource. 1567 "attestationAuthority": { # Note kind that represents a logical attestation "role" or "authority". For example, an organization might have one `Authority` for "QA" and one for "build". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project. # A note describing an attestation role. 1568 "hint": { # This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from "readable" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify. # Hint hints at the purpose of the attestation authority. 1569 "humanReadableName": "A String", # Required. The human readable name of this attestation authority, for example "qa". 1570 }, 1571 }, 1572 "baseImage": { # Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. # A note describing a base image. 1573 "fingerprint": { # A set of properties that uniquely identify a given Docker image. # Required. Immutable. The fingerprint of the base image. 1574 "v1Name": "A String", # Required. The layer ID of the final layer in the Docker image's v1 representation. 1575 "v2Blob": [ # Required. The ordered list of v2 blobs that represent a given image. 1576 "A String", 1577 ], 1578 "v2Name": "A String", # Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the final blob is kept. 1579 }, 1580 "resourceUrl": "A String", # Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images. 1581 }, 1582 "build": { # Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence. # A note describing build provenance for a verifiable build. 1583 "builderVersion": "A String", # Required. Immutable. Version of the builder which produced this build. 1584 "signature": { # Message encapsulating the signature of the verified build. # Signature of the build in occurrences pointing to this build note containing build details. 1585 "keyId": "A String", # An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service). 1586 "keyType": "A String", # The type of the key, either stored in `public_key` or referenced in `key_id`. 1587 "publicKey": "A String", # Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys. This field may be empty if `key_id` references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 1588 "signature": "A String", # Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded. 1589 }, 1590 }, 1591 "createTime": "A String", # Output only. The time this note was created. This field can be used as a filter in list requests. 1592 "deployable": { # An artifact that can be deployed in some runtime. # A note describing something that can be deployed. 1593 "resourceUri": [ # Required. Resource URI for the artifact being deployed. 1594 "A String", 1595 ], 1596 }, 1597 "discovery": { # A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis. # A note describing the initial analysis of a resource. 1598 "analysisKind": "A String", # Required. Immutable. The kind of analysis that is handled by this discovery. 1599 }, 1600 "expirationTime": "A String", # Time of expiration for this note. Empty if note does not expire. 1601 "intoto": { # This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note. # A note describing an in-toto link. 1602 "expectedCommand": [ # This field contains the expected command used to perform the step. 1603 "A String", 1604 ], 1605 "expectedMaterials": [ # The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. 1606 { # Defines an object to declare an in-toto artifact rule 1607 "artifactRule": [ 1608 "A String", 1609 ], 1610 }, 1611 ], 1612 "expectedProducts": [ 1613 { # Defines an object to declare an in-toto artifact rule 1614 "artifactRule": [ 1615 "A String", 1616 ], 1617 }, 1618 ], 1619 "signingKeys": [ # This field contains the public keys that can be used to verify the signatures on the step metadata. 1620 { # This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { "key_id": "776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...", "key_type": "rsa", "public_key_value": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0B...", "key_scheme": "rsassa-pss-sha256" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification. 1621 "keyId": "A String", # key_id is an identifier for the signing key. 1622 "keyScheme": "A String", # This field contains the corresponding signature scheme. Eg: "rsassa-pss-sha256". 1623 "keyType": "A String", # This field identifies the specific signing method. Eg: "rsa", "ed25519", and "ecdsa". 1624 "publicKeyValue": "A String", # This field contains the actual public key. 1625 }, 1626 ], 1627 "stepName": "A String", # This field identifies the name of the step in the supply chain. 1628 "threshold": "A String", # This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. 1629 }, 1630 "kind": "A String", # Output only. The type of analysis. This field can be used as a filter in list requests. 1631 "longDescription": "A String", # A detailed description of this note. 1632 "name": "A String", # Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 1633 "package": { # This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions. # A note describing a package hosted by various package managers. 1634 "distribution": [ # The various channels by which a package is distributed. 1635 { # This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror. 1636 "architecture": "A String", # The CPU architecture for which packages in this distribution channel were built. 1637 "cpeUri": "A String", # Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. 1638 "description": "A String", # The distribution channel-specific description of this package. 1639 "latestVersion": { # Version contains structured information about the version of a package. # The latest available version of this package in this distribution channel. 1640 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1641 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1642 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1643 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1644 "revision": "A String", # The iteration of the package build from the above version. 1645 }, 1646 "maintainer": "A String", # A freeform string denoting the maintainer of this package. 1647 "url": "A String", # The distribution channel-specific homepage for this package. 1648 }, 1649 ], 1650 "name": "A String", # Required. Immutable. The name of the package. 1651 }, 1652 "relatedNoteNames": [ # Other notes related to this note. 1653 "A String", 1654 ], 1655 "relatedUrl": [ # URLs associated with this note. 1656 { # Metadata for any related URL information. 1657 "label": "A String", # Label to describe usage of the URL. 1658 "url": "A String", # Specific URL associated with the resource. 1659 }, 1660 ], 1661 "sbom": { # DocumentNote represents an SPDX Document Creation Infromation section: https://spdx.github.io/spdx-spec/2-document-creation-information/ # A note describing a software bill of materials. 1662 "dataLicence": "A String", # Compliance with the SPDX specification includes populating the SPDX fields therein with data related to such fields ("SPDX-Metadata") 1663 "spdxVersion": "A String", # Provide a reference number that can be used to understand how to parse and interpret the rest of the file 1664 }, 1665 "shortDescription": "A String", # A one sentence description of this note. 1666 "spdxFile": { # FileNote represents an SPDX File Information section: https://spdx.github.io/spdx-spec/4-file-information/ # A note describing an SPDX File. 1667 "checksum": [ # Provide a unique identifier to match analysis information on each specific file in a package 1668 "A String", 1669 ], 1670 "fileType": "A String", # This field provides information about the type of file identified 1671 "title": "A String", # Identify the full path and filename that corresponds to the file information in this section 1672 }, 1673 "spdxPackage": { # PackageInfoNote represents an SPDX Package Information section: https://spdx.github.io/spdx-spec/3-package-information/ # A note describing an SPDX Package. 1674 "analyzed": True or False, # Indicates whether the file content of this package has been available for or subjected to analysis when creating the SPDX document 1675 "attribution": "A String", # A place for the SPDX data creator to record, at the package level, acknowledgements that may be needed to be communicated in some contexts 1676 "checksum": "A String", # Provide an independently reproducible mechanism that permits unique identification of a specific package that correlates to the data in this SPDX file 1677 "copyright": "A String", # Identify the copyright holders of the package, as well as any dates present 1678 "detailedDescription": "A String", # A more detailed description of the package 1679 "downloadLocation": "A String", # This section identifies the download Universal Resource Locator (URL), or a specific location within a version control system (VCS) for the package at the time that the SPDX file was created 1680 "externalRefs": [ # ExternalRef 1681 { # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 1682 "category": "A String", # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 1683 "comment": "A String", # Human-readable information about the purpose and target of the reference 1684 "locator": "A String", # The unique string with no spaces necessary to access the package-specific information, metadata, or content within the target location 1685 "type": "A String", # Type of category (e.g. 'npm' for the PACKAGE_MANAGER category) 1686 }, 1687 ], 1688 "filesLicenseInfo": [ # Contain the license the SPDX file creator has concluded as governing the This field is to contain a list of all licenses found in the package. The relationship between licenses (i.e., conjunctive, disjunctive) is not specified in this field – it is simply a listing of all licenses found 1689 "A String", 1690 ], 1691 "homePage": "A String", # Provide a place for the SPDX file creator to record a web site that serves as the package's home page 1692 "licenseDeclared": { # License information: https://spdx.github.io/spdx-spec/3-package-information/#315-declared-license # List the licenses that have been declared by the authors of the package 1693 "comments": "A String", # Comments 1694 "expression": "A String", # Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/ 1695 }, 1696 "originator": "A String", # If the package identified in the SPDX file originated from a different person or organization than identified as Package Supplier, this field identifies from where or whom the package originally came 1697 "packageType": "A String", # The type of package: OS, MAVEN, GO, GO_STDLIB, etc. 1698 "summaryDescription": "A String", # A short description of the package 1699 "supplier": "A String", # Identify the actual distribution source for the package/directory identified in the SPDX file 1700 "title": "A String", # Identify the full name of the package as given by the Package Originator 1701 "verificationCode": "A String", # This field provides an independently reproducible mechanism identifying specific contents of a package based on the actual files (except the SPDX file itself, if it is included in the package) that make up each package and that correlates to the data in this SPDX file 1702 "version": "A String", # Identify the version of the package 1703 }, 1704 "spdxRelationship": { # RelationshipNote represents an SPDX Relationship section: https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ # A note describing an SPDX File. 1705 "type": "A String", # The type of relationship between the source and target SPDX elements 1706 }, 1707 "updateTime": "A String", # Output only. The time this note was last updated. This field can be used as a filter in list requests. 1708 "vulnerability": { # Vulnerability provides metadata about a security vulnerability in a Note. # A note describing a package vulnerability. 1709 "cvssScore": 3.14, # The CVSS score for this vulnerability. 1710 "cvssV3": { # Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document # The full description of the CVSSv3. 1711 "attackComplexity": "A String", 1712 "attackVector": "A String", # Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. 1713 "availabilityImpact": "A String", 1714 "baseScore": 3.14, # The base score is a function of the base metric scores. 1715 "confidentialityImpact": "A String", 1716 "exploitabilityScore": 3.14, 1717 "impactScore": 3.14, 1718 "integrityImpact": "A String", 1719 "privilegesRequired": "A String", 1720 "scope": "A String", 1721 "userInteraction": "A String", 1722 }, 1723 "details": [ # All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. 1724 { # Identifies all appearances of this vulnerability in the package for a specific distro/location. For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 1725 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 1726 "description": "A String", # A vendor-specific description of this note. 1727 "fixedLocation": { # The location of the vulnerability. # The fix for this specific package version. 1728 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar. 1729 "package": "A String", # Required. The package being described. 1730 "version": { # Version contains structured information about the version of a package. # Required. The version of the package being described. 1731 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1732 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1733 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1734 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1735 "revision": "A String", # The iteration of the package build from the above version. 1736 }, 1737 }, 1738 "isObsolete": True or False, # Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. 1739 "maxAffectedVersion": { # Version contains structured information about the version of a package. # The max version of the package in which the vulnerability exists. 1740 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1741 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1742 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1743 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1744 "revision": "A String", # The iteration of the package build from the above version. 1745 }, 1746 "minAffectedVersion": { # Version contains structured information about the version of a package. # The min version of the package in which the vulnerability exists. 1747 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1748 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1749 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1750 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1751 "revision": "A String", # The iteration of the package build from the above version. 1752 }, 1753 "package": "A String", # Required. The name of the package where the vulnerability was found. 1754 "packageType": "A String", # The type of package; whether native or non native(ruby gems, node.js packages etc). 1755 "severityName": "A String", # The severity (eg: distro assigned severity) for this vulnerability. 1756 "source": "A String", # The source from which the information in this Detail was obtained. 1757 "sourceUpdateTime": "A String", # 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. 1758 "vendor": "A String", # The name of the vendor of the product. 1759 }, 1760 ], 1761 "severity": "A String", # Note provider assigned impact of the vulnerability. 1762 "sourceUpdateTime": "A String", # 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. 1763 "windowsDetails": [ # 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. 1764 { 1765 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 1766 "description": "A String", # The description of the vulnerability. 1767 "fixingKbs": [ # Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix. 1768 { 1769 "name": "A String", # The KB name (generally of the form KB[0-9]+ i.e. KB123456). 1770 "url": "A String", # A link to the KB in the Windows update catalog - https://www.catalog.update.microsoft.com/ 1771 }, 1772 ], 1773 "name": "A String", # Required. The name of the vulnerability. 1774 }, 1775 ], 1776 }, 1777} 1778 1779 updateMask: string, The fields to update. 1780 x__xgafv: string, V1 error format. 1781 Allowed values 1782 1 - v1 error format 1783 2 - v2 error format 1784 1785Returns: 1786 An object of the form: 1787 1788 { # A type of analysis that can be done for a resource. 1789 "attestationAuthority": { # Note kind that represents a logical attestation "role" or "authority". For example, an organization might have one `Authority` for "QA" and one for "build". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project. # A note describing an attestation role. 1790 "hint": { # This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from "readable" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify. # Hint hints at the purpose of the attestation authority. 1791 "humanReadableName": "A String", # Required. The human readable name of this attestation authority, for example "qa". 1792 }, 1793 }, 1794 "baseImage": { # Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. # A note describing a base image. 1795 "fingerprint": { # A set of properties that uniquely identify a given Docker image. # Required. Immutable. The fingerprint of the base image. 1796 "v1Name": "A String", # Required. The layer ID of the final layer in the Docker image's v1 representation. 1797 "v2Blob": [ # Required. The ordered list of v2 blobs that represent a given image. 1798 "A String", 1799 ], 1800 "v2Name": "A String", # Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the final blob is kept. 1801 }, 1802 "resourceUrl": "A String", # Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images. 1803 }, 1804 "build": { # Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence. # A note describing build provenance for a verifiable build. 1805 "builderVersion": "A String", # Required. Immutable. Version of the builder which produced this build. 1806 "signature": { # Message encapsulating the signature of the verified build. # Signature of the build in occurrences pointing to this build note containing build details. 1807 "keyId": "A String", # An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service). 1808 "keyType": "A String", # The type of the key, either stored in `public_key` or referenced in `key_id`. 1809 "publicKey": "A String", # Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys. This field may be empty if `key_id` references an external key. For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 1810 "signature": "A String", # Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded. 1811 }, 1812 }, 1813 "createTime": "A String", # Output only. The time this note was created. This field can be used as a filter in list requests. 1814 "deployable": { # An artifact that can be deployed in some runtime. # A note describing something that can be deployed. 1815 "resourceUri": [ # Required. Resource URI for the artifact being deployed. 1816 "A String", 1817 ], 1818 }, 1819 "discovery": { # A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis. # A note describing the initial analysis of a resource. 1820 "analysisKind": "A String", # Required. Immutable. The kind of analysis that is handled by this discovery. 1821 }, 1822 "expirationTime": "A String", # Time of expiration for this note. Empty if note does not expire. 1823 "intoto": { # This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note. # A note describing an in-toto link. 1824 "expectedCommand": [ # This field contains the expected command used to perform the step. 1825 "A String", 1826 ], 1827 "expectedMaterials": [ # The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step. 1828 { # Defines an object to declare an in-toto artifact rule 1829 "artifactRule": [ 1830 "A String", 1831 ], 1832 }, 1833 ], 1834 "expectedProducts": [ 1835 { # Defines an object to declare an in-toto artifact rule 1836 "artifactRule": [ 1837 "A String", 1838 ], 1839 }, 1840 ], 1841 "signingKeys": [ # This field contains the public keys that can be used to verify the signatures on the step metadata. 1842 { # This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { "key_id": "776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...", "key_type": "rsa", "public_key_value": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0B...", "key_scheme": "rsassa-pss-sha256" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification. 1843 "keyId": "A String", # key_id is an identifier for the signing key. 1844 "keyScheme": "A String", # This field contains the corresponding signature scheme. Eg: "rsassa-pss-sha256". 1845 "keyType": "A String", # This field identifies the specific signing method. Eg: "rsa", "ed25519", and "ecdsa". 1846 "publicKeyValue": "A String", # This field contains the actual public key. 1847 }, 1848 ], 1849 "stepName": "A String", # This field identifies the name of the step in the supply chain. 1850 "threshold": "A String", # This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link. 1851 }, 1852 "kind": "A String", # Output only. The type of analysis. This field can be used as a filter in list requests. 1853 "longDescription": "A String", # A detailed description of this note. 1854 "name": "A String", # Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 1855 "package": { # This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions. # A note describing a package hosted by various package managers. 1856 "distribution": [ # The various channels by which a package is distributed. 1857 { # This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror. 1858 "architecture": "A String", # The CPU architecture for which packages in this distribution channel were built. 1859 "cpeUri": "A String", # Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. 1860 "description": "A String", # The distribution channel-specific description of this package. 1861 "latestVersion": { # Version contains structured information about the version of a package. # The latest available version of this package in this distribution channel. 1862 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1863 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1864 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1865 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1866 "revision": "A String", # The iteration of the package build from the above version. 1867 }, 1868 "maintainer": "A String", # A freeform string denoting the maintainer of this package. 1869 "url": "A String", # The distribution channel-specific homepage for this package. 1870 }, 1871 ], 1872 "name": "A String", # Required. Immutable. The name of the package. 1873 }, 1874 "relatedNoteNames": [ # Other notes related to this note. 1875 "A String", 1876 ], 1877 "relatedUrl": [ # URLs associated with this note. 1878 { # Metadata for any related URL information. 1879 "label": "A String", # Label to describe usage of the URL. 1880 "url": "A String", # Specific URL associated with the resource. 1881 }, 1882 ], 1883 "sbom": { # DocumentNote represents an SPDX Document Creation Infromation section: https://spdx.github.io/spdx-spec/2-document-creation-information/ # A note describing a software bill of materials. 1884 "dataLicence": "A String", # Compliance with the SPDX specification includes populating the SPDX fields therein with data related to such fields ("SPDX-Metadata") 1885 "spdxVersion": "A String", # Provide a reference number that can be used to understand how to parse and interpret the rest of the file 1886 }, 1887 "shortDescription": "A String", # A one sentence description of this note. 1888 "spdxFile": { # FileNote represents an SPDX File Information section: https://spdx.github.io/spdx-spec/4-file-information/ # A note describing an SPDX File. 1889 "checksum": [ # Provide a unique identifier to match analysis information on each specific file in a package 1890 "A String", 1891 ], 1892 "fileType": "A String", # This field provides information about the type of file identified 1893 "title": "A String", # Identify the full path and filename that corresponds to the file information in this section 1894 }, 1895 "spdxPackage": { # PackageInfoNote represents an SPDX Package Information section: https://spdx.github.io/spdx-spec/3-package-information/ # A note describing an SPDX Package. 1896 "analyzed": True or False, # Indicates whether the file content of this package has been available for or subjected to analysis when creating the SPDX document 1897 "attribution": "A String", # A place for the SPDX data creator to record, at the package level, acknowledgements that may be needed to be communicated in some contexts 1898 "checksum": "A String", # Provide an independently reproducible mechanism that permits unique identification of a specific package that correlates to the data in this SPDX file 1899 "copyright": "A String", # Identify the copyright holders of the package, as well as any dates present 1900 "detailedDescription": "A String", # A more detailed description of the package 1901 "downloadLocation": "A String", # This section identifies the download Universal Resource Locator (URL), or a specific location within a version control system (VCS) for the package at the time that the SPDX file was created 1902 "externalRefs": [ # ExternalRef 1903 { # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 1904 "category": "A String", # An External Reference allows a Package to reference an external source of additional information, metadata, enumerations, asset identifiers, or downloadable content believed to be relevant to the Package 1905 "comment": "A String", # Human-readable information about the purpose and target of the reference 1906 "locator": "A String", # The unique string with no spaces necessary to access the package-specific information, metadata, or content within the target location 1907 "type": "A String", # Type of category (e.g. 'npm' for the PACKAGE_MANAGER category) 1908 }, 1909 ], 1910 "filesLicenseInfo": [ # Contain the license the SPDX file creator has concluded as governing the This field is to contain a list of all licenses found in the package. The relationship between licenses (i.e., conjunctive, disjunctive) is not specified in this field – it is simply a listing of all licenses found 1911 "A String", 1912 ], 1913 "homePage": "A String", # Provide a place for the SPDX file creator to record a web site that serves as the package's home page 1914 "licenseDeclared": { # License information: https://spdx.github.io/spdx-spec/3-package-information/#315-declared-license # List the licenses that have been declared by the authors of the package 1915 "comments": "A String", # Comments 1916 "expression": "A String", # Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/ 1917 }, 1918 "originator": "A String", # If the package identified in the SPDX file originated from a different person or organization than identified as Package Supplier, this field identifies from where or whom the package originally came 1919 "packageType": "A String", # The type of package: OS, MAVEN, GO, GO_STDLIB, etc. 1920 "summaryDescription": "A String", # A short description of the package 1921 "supplier": "A String", # Identify the actual distribution source for the package/directory identified in the SPDX file 1922 "title": "A String", # Identify the full name of the package as given by the Package Originator 1923 "verificationCode": "A String", # This field provides an independently reproducible mechanism identifying specific contents of a package based on the actual files (except the SPDX file itself, if it is included in the package) that make up each package and that correlates to the data in this SPDX file 1924 "version": "A String", # Identify the version of the package 1925 }, 1926 "spdxRelationship": { # RelationshipNote represents an SPDX Relationship section: https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ # A note describing an SPDX File. 1927 "type": "A String", # The type of relationship between the source and target SPDX elements 1928 }, 1929 "updateTime": "A String", # Output only. The time this note was last updated. This field can be used as a filter in list requests. 1930 "vulnerability": { # Vulnerability provides metadata about a security vulnerability in a Note. # A note describing a package vulnerability. 1931 "cvssScore": 3.14, # The CVSS score for this vulnerability. 1932 "cvssV3": { # Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document # The full description of the CVSSv3. 1933 "attackComplexity": "A String", 1934 "attackVector": "A String", # Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. 1935 "availabilityImpact": "A String", 1936 "baseScore": 3.14, # The base score is a function of the base metric scores. 1937 "confidentialityImpact": "A String", 1938 "exploitabilityScore": 3.14, 1939 "impactScore": 3.14, 1940 "integrityImpact": "A String", 1941 "privilegesRequired": "A String", 1942 "scope": "A String", 1943 "userInteraction": "A String", 1944 }, 1945 "details": [ # All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. 1946 { # Identifies all appearances of this vulnerability in the package for a specific distro/location. For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 1947 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 1948 "description": "A String", # A vendor-specific description of this note. 1949 "fixedLocation": { # The location of the vulnerability. # The fix for this specific package version. 1950 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar. 1951 "package": "A String", # Required. The package being described. 1952 "version": { # Version contains structured information about the version of a package. # Required. The version of the package being described. 1953 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1954 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1955 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1956 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1957 "revision": "A String", # The iteration of the package build from the above version. 1958 }, 1959 }, 1960 "isObsolete": True or False, # Whether this detail is obsolete. Occurrences are expected not to point to obsolete details. 1961 "maxAffectedVersion": { # Version contains structured information about the version of a package. # The max version of the package in which the vulnerability exists. 1962 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1963 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1964 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1965 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1966 "revision": "A String", # The iteration of the package build from the above version. 1967 }, 1968 "minAffectedVersion": { # Version contains structured information about the version of a package. # The min version of the package in which the vulnerability exists. 1969 "epoch": 42, # Used to correct mistakes in the version numbering scheme. 1970 "inclusive": True or False, # Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range. 1971 "kind": "A String", # Required. Distinguishes between sentinel MIN/MAX versions and normal versions. 1972 "name": "A String", # Required only when version kind is NORMAL. The main part of the version name. 1973 "revision": "A String", # The iteration of the package build from the above version. 1974 }, 1975 "package": "A String", # Required. The name of the package where the vulnerability was found. 1976 "packageType": "A String", # The type of package; whether native or non native(ruby gems, node.js packages etc). 1977 "severityName": "A String", # The severity (eg: distro assigned severity) for this vulnerability. 1978 "source": "A String", # The source from which the information in this Detail was obtained. 1979 "sourceUpdateTime": "A String", # 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. 1980 "vendor": "A String", # The name of the vendor of the product. 1981 }, 1982 ], 1983 "severity": "A String", # Note provider assigned impact of the vulnerability. 1984 "sourceUpdateTime": "A String", # 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. 1985 "windowsDetails": [ # 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. 1986 { 1987 "cpeUri": "A String", # Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar. 1988 "description": "A String", # The description of the vulnerability. 1989 "fixingKbs": [ # Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix. 1990 { 1991 "name": "A String", # The KB name (generally of the form KB[0-9]+ i.e. KB123456). 1992 "url": "A String", # A link to the KB in the Windows update catalog - https://www.catalog.update.microsoft.com/ 1993 }, 1994 ], 1995 "name": "A String", # Required. The name of the vulnerability. 1996 }, 1997 ], 1998 }, 1999}</pre> 2000</div> 2001 2002<div class="method"> 2003 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code> 2004 <pre>Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. 2005 2006Args: 2007 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required) 2008 body: object, The request body. 2009 The object takes the form of: 2010 2011{ # Request message for `SetIamPolicy` method. 2012 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. 2013 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 2014 { # Associates `members`, or principals, with a `role`. 2015 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 2016 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 2017 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 2018 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 2019 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 2020 }, 2021 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 2022 "A String", 2023 ], 2024 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 2025 }, 2026 ], 2027 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 2028 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 2029 }, 2030} 2031 2032 x__xgafv: string, V1 error format. 2033 Allowed values 2034 1 - v1 error format 2035 2 - v2 error format 2036 2037Returns: 2038 An object of the form: 2039 2040 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). 2041 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 2042 { # Associates `members`, or principals, with a `role`. 2043 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 2044 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 2045 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 2046 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 2047 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 2048 }, 2049 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 2050 "A String", 2051 ], 2052 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 2053 }, 2054 ], 2055 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 2056 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 2057}</pre> 2058</div> 2059 2060<div class="method"> 2061 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code> 2062 <pre>Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. 2063 2064Args: 2065 resource: string, REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. (required) 2066 body: object, The request body. 2067 The object takes the form of: 2068 2069{ # Request message for `TestIamPermissions` method. 2070 "permissions": [ # The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). 2071 "A String", 2072 ], 2073} 2074 2075 x__xgafv: string, V1 error format. 2076 Allowed values 2077 1 - v1 error format 2078 2 - v2 error format 2079 2080Returns: 2081 An object of the form: 2082 2083 { # Response message for `TestIamPermissions` method. 2084 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 2085 "A String", 2086 ], 2087}</pre> 2088</div> 2089 2090</body></html>