Creates a new note.

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 --scope <scope> projects notes-create ...

Required Scalar Argument

  • <parent> (string)
    • Required. The name of the project in the form of projects/[PROJECT_ID], under which the note is to be created.

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:

Note:
  attestation:
    hint:
      human-readable-name: string
  build:
    builder-version: string
  compliance:
    cis-benchmark:
      profile-level: integer
      severity: string
    description: string
    rationale: string
    remediation: string
    scan-instructions: string
    title: string
  create-time: string
  deployment:
    resource-uri: [string]
  discovery:
    analysis-kind: string
  dsse-attestation:
    hint:
      human-readable-name: string
  expiration-time: string
  image:
    fingerprint:
      v1-name: string
      v2-blob: [string]
      v2-name: string
    resource-url: string
  kind: string
  long-description: string
  name: string
  package:
    architecture: string
    cpe-uri: string
    description: string
    license:
      comments: string
      expression: string
    maintainer: string
    name: string
    package-type: string
    url: string
    version:
      epoch: integer
      full-name: string
      inclusive: boolean
      kind: string
      name: string
      revision: string
  related-note-names: [string]
  sbom-reference:
    format: string
    version: string
  short-description: string
  update-time: string
  upgrade:
    package: string
    version:
      epoch: integer
      full-name: string
      inclusive: boolean
      kind: string
      name: string
      revision: string
    windows-update:
      description: string
      identity:
        revision: integer
        update-id: string
      kb-article-ids: [string]
      last-published-timestamp: string
      support-url: string
      title: string
  vulnerability:
    cvss-score: number
    cvss-v2:
      attack-complexity: string
      attack-vector: string
      authentication: string
      availability-impact: string
      base-score: number
      confidentiality-impact: string
      exploitability-score: number
      impact-score: number
      integrity-impact: string
      privileges-required: string
      scope: string
      user-interaction: string
    cvss-v3:
      attack-complexity: string
      attack-vector: string
      availability-impact: string
      base-score: number
      confidentiality-impact: string
      exploitability-score: number
      impact-score: number
      integrity-impact: string
      privileges-required: string
      scope: string
      user-interaction: string
    cvss-version: string
    severity: string
    source-update-time: string
  vulnerability-assessment:
    assessment:
      cve: string
      impacts: [string]
      justification:
        details: string
        justification-type: string
      long-description: string
      short-description: string
      state: string
      vulnerability-id: string
    language-code: string
    long-description: string
    product:
      generic-uri: string
      id: string
      name: string
    publisher:
      issuing-authority: string
      name: string
      publisher-namespace: string
    short-description: string
    title: 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.hint human-readable-name=et

    • Required. The human readable name of this attestation authority, for example "qa".
  • ...build builder-version=magna

    • Required. Immutable. Version of the builder which produced this build.
  • ..compliance.cis-benchmark profile-level=90

    • No description provided.
  • severity=ipsum

    • No description provided.
  • .. description=voluptua.

    • A description about this compliance check.
  • rationale=at
    • A rationale for the existence of this compliance check.
  • remediation=sanctus
    • A description of remediation steps if the compliance check fails.
  • scan-instructions=sed
    • Serialized scan instructions with a predefined format.
  • title=amet.

    • The title that identifies this compliance check.
  • .. create-time=takimata

    • Output only. The time this note was created. This field can be used as a filter in list requests.
  • deployment resource-uri=amet.

    • Required. Resource URI for the artifact being deployed.
    • Each invocation of this argument appends the given value to the array.
  • ..discovery analysis-kind=duo

    • Required. Immutable. The kind of analysis that is handled by this discovery.
  • ..dsse-attestation.hint human-readable-name=ipsum

    • Required. The human readable name of this attestation authority, for example "cloudbuild-prod".
  • ... expiration-time=gubergren

    • Time of expiration for this note. Empty if note does not expire.
  • image.fingerprint v1-name=lorem
    • Required. The layer ID of the final layer in the Docker image's v1 representation.
  • v2-blob=gubergren
    • 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=eos

    • 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.
  • .. resource-url=dolor

    • Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images.
  • .. kind=ea

    • Output only. The type of analysis. This field can be used as a filter in list requests.
  • long-description=ipsum
    • A detailed description of this note.
  • name=invidunt
    • Output only. The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
  • package architecture=amet
    • The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages.
  • cpe-uri=duo
    • The cpe_uri in CPE format denoting the package manager version distributing a package. The cpe_uri will be blank for language packages.
  • description=ipsum
    • The description of this package.
  • license comments=sed
    • Comments
  • expression=ut

    • Often a single license can be used to represent the licensing terms. Sometimes it is necessary to include a choice of one or more licenses or some combination of license identifiers. Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", "GPL-2.0-or-later WITH Bison-exception-2.2".
  • .. maintainer=gubergren

    • A freeform text denoting the maintainer of this package.
  • name=rebum.
    • Required. Immutable. The name of the package.
  • package-type=est
    • The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).
  • url=ipsum
    • The homepage for this package.
  • version epoch=51
    • Used to correct mistakes in the version numbering scheme.
  • full-name=est
    • Human readable version string. This string is of the form :- and is only set when kind is NORMAL.
  • inclusive=true
    • 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.
  • kind=ea
    • Required. Distinguishes between sentinel MIN/MAX versions and normal versions.
  • name=dolor
    • Required only when version kind is NORMAL. The main part of the version name.
  • revision=lorem

    • The iteration of the package build from the above version.
  • ... related-note-names=eos

    • Other notes related to this note.
    • Each invocation of this argument appends the given value to the array.
  • sbom-reference format=labore
    • The format that SBOM takes. E.g. may be spdx, cyclonedx, etc...
  • version=sed

    • The version of the format that the SBOM takes. E.g. if the format is spdx, the version may be 2.3.
  • .. short-description=duo

    • A one sentence description of this note.
  • update-time=sed
    • Output only. The time this note was last updated. This field can be used as a filter in list requests.
  • upgrade package=no
    • Required for non-Windows OS. The package this Upgrade is for.
  • version epoch=86
    • Used to correct mistakes in the version numbering scheme.
  • full-name=kasd
    • Human readable version string. This string is of the form :- and is only set when kind is NORMAL.
  • inclusive=true
    • 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.
  • kind=et
    • Required. Distinguishes between sentinel MIN/MAX versions and normal versions.
  • name=et
    • Required only when version kind is NORMAL. The main part of the version name.
  • revision=vero

    • The iteration of the package build from the above version.
  • ..windows-update description=erat

    • The localized description of the update.
  • identity revision=8
    • The revision number of the update.
  • update-id=duo

    • The revision independent identifier of the update.
  • .. kb-article-ids=dolore

    • The Microsoft Knowledge Base article IDs that are associated with the update.
    • Each invocation of this argument appends the given value to the array.
  • last-published-timestamp=et
    • The last published timestamp of the update.
  • support-url=voluptua.
    • The hyperlink to the support information for the update.
  • title=amet.

    • The localized title of the update.
  • ...vulnerability cvss-score=0.04388040358005296

    • The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity.
  • cvss-v2 attack-complexity=dolor
    • No description provided.
  • attack-vector=et
    • Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments.
  • authentication=et
    • No description provided.
  • availability-impact=sadipscing
    • No description provided.
  • base-score=0.6755988748158552
    • The base score is a function of the base metric scores.
  • confidentiality-impact=duo
    • No description provided.
  • exploitability-score=0.19681975392268636
    • No description provided.
  • impact-score=0.10459029141758258
    • No description provided.
  • integrity-impact=vero
    • No description provided.
  • privileges-required=elitr
    • No description provided.
  • scope=lorem
    • No description provided.
  • user-interaction=diam

    • No description provided.
  • ..cvss-v3 attack-complexity=no

    • No description provided.
  • attack-vector=ipsum
    • Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments.
  • availability-impact=accusam
    • No description provided.
  • base-score=0.333591971041029
    • The base score is a function of the base metric scores.
  • confidentiality-impact=voluptua.
    • No description provided.
  • exploitability-score=0.7904276045322813
    • No description provided.
  • impact-score=0.5496092442112607
    • No description provided.
  • integrity-impact=amet.
    • No description provided.
  • privileges-required=sed
    • No description provided.
  • scope=takimata
    • No description provided.
  • user-interaction=dolores

    • No description provided.
  • .. cvss-version=gubergren

    • CVSS version used to populate cvss_score and severity.
  • severity=et
    • The note provider assigned severity of this vulnerability.
  • source-update-time=accusam

    • 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.
  • ..vulnerability-assessment.assessment cve=voluptua.

    • Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. Deprecated: Use vulnerability_id instead to denote CVEs.
  • impacts=dolore
    • Contains information about the impact of this vulnerability, this will change with time.
    • Each invocation of this argument appends the given value to the array.
  • justification details=dolore
    • Additional details on why this justification was chosen.
  • justification-type=dolore

    • The justification type for this vulnerability.
  • .. long-description=voluptua.

    • A detailed description of this Vex.
  • short-description=amet.
    • A one sentence description of this Vex.
  • state=ea
    • Provides the state of this Vulnerability assessment.
  • vulnerability-id=sadipscing

    • The vulnerability identifier for this Assessment. Will hold one of common identifiers e.g. CVE, GHSA etc.
  • .. language-code=lorem

    • Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646.
  • long-description=invidunt
    • A detailed description of this Vex.
  • product generic-uri=no
    • Contains a URI which is vendor-specific. Example: The artifact repository URL of an image.
  • id=est
    • Token that identifies a product so that it can be referred to from other parts in the document. There is no predefined format as long as it uniquely identifies a group in the context of the current document.
  • name=at

    • Name of the product.
  • ..publisher issuing-authority=sed

    • Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations.
  • name=sit
    • Name of the publisher. Examples: 'Google', 'Google Cloud Platform'.
  • publisher-namespace=et

    • The context or namespace. Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party. Example: https://csaf.io
  • .. short-description=tempor

    • A one sentence description of this Vex.
  • title=aliquyam
    • The title of the note. E.g. Vex-Debian-11.4

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 note-id=string
    • Required. The ID to use for this note.

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").