Updates the specified occurrence.

Scopes

You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: containeranalysis1-beta1 --scope <scope> projects occurrences-patch ...

Required Scalar Argument

  • <name> (string)
    • Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

Occurrence:
  attestation:
    attestation:
      generic-signed-attestation:
        content-type: string
        serialized-payload: string
      pgp-signed-attestation:
        content-type: string
        pgp-key-id: string
        signature: string
  build:
    provenance:
      build-options: { string: string }
      builder-version: string
      create-time: string
      creator: string
      end-time: string
      id: string
      logs-uri: string
      project-id: string
      source-provenance:
        artifact-storage-source-uri: string
        context:
          cloud-repo:
            alias-context:
              kind: string
              name: string
            repo-id:
              project-repo-id:
                project-id: string
                repo-name: string
              uid: string
            revision-id: string
          gerrit:
            alias-context:
              kind: string
              name: string
            gerrit-project: string
            host-uri: string
            revision-id: string
          git:
            revision-id: string
            url: string
          labels: { string: string }
      start-time: string
      trigger-id: string
    provenance-bytes: string
  create-time: string
  deployment:
    deployment:
      address: string
      config: string
      deploy-time: string
      platform: string
      resource-uri: [string]
      undeploy-time: string
      user-email: string
  derived-image:
    derived-image:
      base-resource-url: string
      distance: integer
      fingerprint:
        v1-name: string
        v2-blob: [string]
        v2-name: string
  discovered:
    discovered:
      analysis-status: string
      analysis-status-error:
        code: integer
        message: string
      continuous-analysis: string
      last-analysis-time: string
  installation:
    installation:
      name: string
  intoto:
    signed:
      byproducts:
        custom-values: { string: string }
      command: [string]
      environment:
        custom-values: { string: string }
  kind: string
  name: string
  note-name: string
  remediation: string
  resource:
    content-hash:
      type: string
      value: string
    name: string
    uri: string
  sbom:
    create-time: string
    creator-comment: string
    creators: [string]
    document-comment: string
    external-document-refs: [string]
    id: string
    license-list-version: string
    namespace: string
    title: string
  spdx-file:
    attributions: [string]
    comment: string
    contributors: [string]
    copyright: string
    files-license-info: [string]
    id: string
    license-concluded:
      comments: string
      expression: string
    notice: string
  spdx-package:
    comment: string
    filename: string
    home-page: string
    id: string
    license-concluded:
      comments: string
      expression: string
    package-type: string
    source-info: string
    summary-description: string
    title: string
    version: string
  spdx-relationship:
    comment: string
    source: string
    target: string
    type: string
  update-time: string
  vulnerability:
    cvss-score: number
    effective-severity: string
    long-description: string
    severity: string
    short-description: string
    type: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r .attestation.attestation.generic-signed-attestation content-type=tempor
    • Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema).
  • serialized-payload=sea

    • The serialized payload that is verified by one or more signatures. The encoding and semantic meaning of this payload must match what is set in content_type.
  • ..pgp-signed-attestation content-type=et

    • Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema).
  • pgp-key-id=lorem
    • The cryptographic fingerprint of the key used to generate the signature, as output by, e.g. gpg --list-keys. This should be the version 4, full 160-bit fingerprint, expressed as a 40 character hexidecimal string. See https://tools.ietf.org/html/rfc4880#section-12.2 for details. Implementations may choose to acknowledge "LONG", "SHORT", or other abbreviated key IDs, but only the full fingerprint is guaranteed to work. In gpg, the full fingerprint can be retrieved from the fpr field returned when calling --list-keys with --with-colons. For example: gpg --with-colons --with-fingerprint --force-v4-certs \ --list-keys attester@example.com tru::1:1513631572:0:3:1:5 pub:...... fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: Above, the fingerprint is 24FF6481B76AC91E66A00AC657A93A81EF3AE6FB.
  • signature=magna

    • Required. The raw content of the signature, as output by GNU Privacy Guard (GPG) or equivalent. Since this message only supports attached signatures, the payload that was signed must be attached. While the signature format supported is dependent on the verification implementation, currently only ASCII-armored (--armor to gpg), non-clearsigned (--sign rather than --clearsign to gpg) are supported. Concretely, gpg --sign --armor --output=signature.gpg payload.json will create the signature content expected in this field in signature.gpg for the payload.json attestation payload.
  • ....build.provenance build-options=key=takimata

    • Special options applied to this build. This is a catch-all field where build providers can enter any desired additional details.
    • the value will be associated with the given key
  • builder-version=rebum.
    • Version string of the builder at the time this build was executed.
  • create-time=at
    • Time at which the build was created.
  • creator=invidunt
    • E-mail address of the user who initiated this build. Note that this was the user's e-mail address at the time the build was initiated; this address may not represent the same end-user for all time.
  • end-time=clita
    • Time at which execution of the build was finished.
  • id=stet
    • Required. Unique identifier of the build.
  • logs-uri=aliquyam
    • URI where any logs for this provenance were written.
  • project-id=ut
    • ID of the project.
  • source-provenance artifact-storage-source-uri=sit
    • If provided, the input binary artifacts for the build came from this location.
  • context.cloud-repo.alias-context kind=vero
    • The alias kind.
  • name=rebum.

    • The alias name.
  • ..repo-id.project-repo-id project-id=dolores

    • The ID of the project.
  • repo-name=consetetur

    • The name of the repo. Leave empty for the default repo.
  • .. uid=dolores

    • A server-assigned, globally unique identifier.
  • .. revision-id=sed

    • A revision ID.
  • ..gerrit.alias-context kind=invidunt

    • The alias kind.
  • name=clita

    • The alias name.
  • .. gerrit-project=dolor

    • The full project name within the host. Projects may be nested, so "project/subproject" is a valid project name. The "repo name" is the hostURI/project.
  • host-uri=aliquyam
    • The URI of a running Gerrit instance.
  • revision-id=magna

    • A revision (commit) ID.
  • ..git revision-id=diam

    • Git commit hash.
  • url=nonumy

    • Git repository URL.
  • .. labels=key=et

    • Labels with user defined metadata.
    • the value will be associated with the given key
  • ... start-time=sanctus

    • Time at which execution of the build was started.
  • trigger-id=accusam

    • Trigger identifier if the build was triggered automatically; empty if not.
  • .. provenance-bytes=tempor

    • Serialized JSON representation of the provenance, used in generating the build signature in the corresponding build note. After verifying the signature, provenance_bytes can be unmarshalled and compared to the provenance to confirm that it is unchanged. A base64-encoded string representation of the provenance bytes is used for the signature in order to interoperate with openssl which expects this format for signature verification. The serialized form is captured both to avoid ambiguity in how the provenance is marshalled to json as well to prevent incompatibilities with future changes.
  • .. create-time=sed

    • Output only. The time this occurrence was created.
  • deployment.deployment address=est
    • Address of the runtime element hosting this deployment.
  • config=takimata
    • Configuration used to create this deployment.
  • deploy-time=dolor
    • Required. Beginning of the lifetime of this deployment.
  • platform=diam
    • Platform hosting this deployment.
  • resource-uri=at
    • Output only. Resource URI for the artifact being deployed taken from the deployable field with the same name.
    • Each invocation of this argument appends the given value to the array.
  • undeploy-time=erat
    • End of the lifetime of this deployment.
  • user-email=justo

    • Identity of the user that triggered this deployment.
  • ...derived-image.derived-image base-resource-url=ipsum

    • Output only. This contains the base image URL for the derived image occurrence.
  • distance=28
    • Output only. The number of layers by which this image differs from the associated image basis.
  • fingerprint v1-name=dolores
    • Required. The layer ID of the final layer in the Docker image's v1 representation.
  • v2-blob=consetetur
    • Required. The ordered list of v2 blobs that represent a given image.
    • Each invocation of this argument appends the given value to the array.
  • v2-name=no

    • 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.
  • ....discovered.discovered analysis-status=justo

    • The status of discovery for the resource.
  • analysis-status-error code=56
    • The status code, which should be an enum value of google.rpc.Code.
  • message=diam

    • A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  • .. continuous-analysis=sea

    • Whether the resource is continuously analyzed.
  • last-analysis-time=ipsum

    • The last time continuous analysis was done for this resource. Deprecated, do not use.
  • ...installation.installation name=stet

    • Output only. The name of the installed package.
  • ...intoto.signed.byproducts custom-values=key=gubergren

    • No description provided.
    • the value will be associated with the given key
  • .. command=ipsum

    • This field contains the full command executed for the step. This can also be empty if links are generated for operations that aren't directly mapped to a specific command. Each term in the command is an independent string in the list. An example of a command in the in-toto metadata field is: "command": ["git", "clone", "https://github.com/in-toto/demo-project.git"]
    • Each invocation of this argument appends the given value to the array.
  • environment custom-values=key=no

    • No description provided.
    • the value will be associated with the given key
  • .... kind=sit

    • Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests.
  • name=kasd
    • Output only. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
  • note-name=amet
    • Required. Immutable. The analysis note associated with this occurrence, in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID]. This field can be used as a filter in list requests.
  • remediation=lorem
    • A description of actions that can be taken to remedy the note.
  • resource.content-hash type=justo
    • Required. The type of hash that was performed.
  • value=invidunt

    • Required. The hash value.
  • .. name=sed

    • Deprecated, do not use. Use uri instead. The name of the resource. For example, the name of a Docker image - "Debian".
  • uri=nonumy

    • Required. The unique URI of the resource. For example, https://gcr.io/project/image@sha256:foo for a Docker image.
  • ..sbom create-time=sea

    • Identify when the SPDX file was originally created. The date is to be specified according to combined date and time in UTC format as specified in ISO 8601 standard
  • creator-comment=ipsum
    • A field for creators of the SPDX file to provide general comments about the creation of the SPDX file or any other relevant comment not included in the other fields
  • creators=kasd
    • Identify who (or what, in the case of a tool) created the SPDX file. If the SPDX file was created by an individual, indicate the person's name
    • Each invocation of this argument appends the given value to the array.
  • document-comment=justo
    • A field for creators of the SPDX file content to provide comments to the consumers of the SPDX document
  • external-document-refs=ea
    • Identify any external SPDX documents referenced within this SPDX document
    • Each invocation of this argument appends the given value to the array.
  • id=at
    • Identify the current SPDX document which may be referenced in relationships by other files, packages internally and documents externally
  • license-list-version=erat
    • A field for creators of the SPDX file to provide the version of the SPDX License List used when the SPDX file was created
  • namespace=clita
    • Provide an SPDX document specific namespace as a unique absolute Uniform Resource Identifier (URI) as specified in RFC-3986, with the exception of the ‘#’ delimiter
  • title=vero

    • Identify name of this document as designated by creator
  • ..spdx-file attributions=invidunt

    • This field provides a place for the SPDX data creator to record, at the file level, acknowledgements that may be needed to be communicated in some contexts
    • Each invocation of this argument appends the given value to the array.
  • comment=nonumy
    • This field provides a place for the SPDX file creator to record any general comments about the file
  • contributors=erat
    • This field provides a place for the SPDX file creator to record file contributors
    • Each invocation of this argument appends the given value to the array.
  • copyright=erat
    • Identify the copyright holder of the file, as well as any dates present
  • files-license-info=dolores
    • This field contains the license information actually found in the file, if any
    • Each invocation of this argument appends the given value to the array.
  • id=ipsum
    • Uniquely identify any element in an SPDX document which may be referenced by other elements
  • license-concluded comments=voluptua.
    • Comments
  • expression=eos

    • Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/
  • .. notice=duo

    • This field provides a place for the SPDX file creator to record license notices or other such related notices found in the file
  • ..spdx-package comment=elitr

    • A place for the SPDX file creator to record any general comments about the package being described
  • filename=consetetur
    • Provide the actual file name of the package, or path of the directory being treated as a package
  • home-page=et
    • Output only. Provide a place for the SPDX file creator to record a web site that serves as the package's home page
  • id=clita
    • Uniquely identify any element in an SPDX document which may be referenced by other elements
  • license-concluded comments=sit
    • Comments
  • expression=takimata

    • Expression: https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/
  • .. package-type=erat

    • Output only. The type of package: OS, MAVEN, GO, GO_STDLIB, etc.
  • source-info=diam
    • Provide a place for the SPDX file creator to record any relevant background information or additional comments about the origin of the package
  • summary-description=nonumy
    • Output only. A short description of the package
  • title=lorem
    • Output only. Identify the full name of the package as given by the Package Originator
  • version=at

    • Output only. Identify the version of the package
  • ..spdx-relationship comment=diam

    • A place for the SPDX file creator to record any general comments about the relationship
  • source=diam
    • Also referred to as SPDXRef-A The source SPDX element (file, package, etc)
  • target=sed
    • Also referred to as SPDXRef-B The target SPDC element (file, package, etc) In cases where there are "known unknowns", the use of the keyword NOASSERTION can be used The keywords NONE can be used to indicate that an SPDX element (package/file/snippet) has no other elements connected by some relationship to it
  • type=et

    • Output only. The type of relationship between the source and target SPDX elements
  • .. update-time=ea

    • Output only. The time this occurrence was last updated.
  • vulnerability cvss-score=0.13615683735090967
    • Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0-10 where 0 indicates low severity and 10 indicates high severity.
  • effective-severity=ea
    • The distro assigned severity for this vulnerability when it is available, and note provider assigned severity when distro has not yet assigned a severity for this vulnerability. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues.
  • long-description=at
    • Output only. A detailed description of this vulnerability.
  • severity=sit
    • Output only. The note provider assigned Severity of the vulnerability.
  • short-description=sit
    • Output only. A one sentence description of this vulnerability.
  • type=lorem
    • The type of package; whether native or non native(ruby gems, node.js packages etc)

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p update-mask=string
    • The fields to update.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").