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-beta1 --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-authority:
    hint:
      human-readable-name: string
  base-image:
    fingerprint:
      v1-name: string
      v2-blob: [string]
      v2-name: string
    resource-url: string
  build:
    builder-version: string
    signature:
      key-id: string
      key-type: string
      public-key: string
      signature: string
  create-time: string
  deployable:
    resource-uri: [string]
  discovery:
    analysis-kind: string
  expiration-time: string
  intoto:
    expected-command: [string]
    step-name: string
    threshold: string
  kind: string
  long-description: string
  name: string
  package:
    name: string
  related-note-names: [string]
  short-description: string
  update-time: string
  vulnerability:
    cvss-score: number
    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
    severity: string
    source-update-time: 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-authority.hint human-readable-name=et

    • Required. The human readable name of this attestation authority, for example "qa".
  • ...base-image.fingerprint v1-name=magna

    • Required. The layer ID of the final layer in the Docker image's v1 representation.
  • v2-blob=no
    • 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=ipsum

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

    • Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images.
  • ..build builder-version=at

    • Required. Immutable. Version of the builder which produced this build.
  • signature key-id=sanctus
    • 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).
  • key-type=sed
    • The type of the key, either stored in public_key or referenced in key_id.
  • public-key=amet.
    • 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
  • signature=takimata

    • Required. Signature of the related BuildProvenance. In JSON, this is base-64 encoded.
  • ... create-time=amet.

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

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

    • Required. Immutable. The kind of analysis that is handled by this discovery.
  • .. expiration-time=gubergren

    • Time of expiration for this note. Empty if note does not expire.
  • intoto expected-command=lorem
    • This field contains the expected command used to perform the step.
    • Each invocation of this argument appends the given value to the array.
  • step-name=gubergren
    • This field identifies the name of the step in the supply chain.
  • threshold=eos

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

    • Output only. The type of analysis. This field can be used as a filter in list requests.
  • long-description=ea
    • A detailed description of this note.
  • name=ipsum
    • Output only. The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
  • package name=invidunt

    • Required. Immutable. The name of the package.
  • .. related-note-names=amet

    • Other notes related to this note.
    • Each invocation of this argument appends the given value to the array.
  • short-description=duo
    • A one sentence description of this note.
  • update-time=ipsum
    • Output only. The time this note was last updated. This field can be used as a filter in list requests.
  • vulnerability cvss-score=0.9001265173058445
    • The CVSS score for this vulnerability.
  • cvss-v3 attack-complexity=ut
    • No description provided.
  • attack-vector=gubergren
    • Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments.
  • availability-impact=rebum.
    • No description provided.
  • base-score=0.34810194289930996
    • The base score is a function of the base metric scores.
  • confidentiality-impact=ipsum
    • No description provided.
  • exploitability-score=0.4033695817113857
    • No description provided.
  • impact-score=0.737544430792817
    • No description provided.
  • integrity-impact=gubergren
    • No description provided.
  • privileges-required=ea
    • No description provided.
  • scope=dolor
    • No description provided.
  • user-interaction=lorem

    • No description provided.
  • .. severity=eos

    • Note provider assigned impact of the vulnerability.
  • source-update-time=labore
    • 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.

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