gcloud container binauthz attestations create --artifact-url=ARTIFACT_URL --public-key-id=PUBLIC_KEY_ID --signature-file=SIGNATURE_FILE [--payload-file=PAYLOAD_FILE] [[--note=NOTE : --note-project=NOTE_PROJECT] | --validate [--attestor=ATTESTOR : --attestor-project=ATTESTOR_PROJECT]] [GCLOUD_WIDE_FLAG …]
gcloud container binauthz attestations create --project=my_proj --artifact-url='gcr.io/example-project/example-image@sha256:abcd' --attestor=projects/foo/attestors/bar --signature-file=signed_artifact_attestation.pgp.sig --public-key-id=AAAA0000000000000000FFFFFFFFFFFFFFFFFFFFTo create an attestation in the project "my_proj" in note "projects/foo/notes/bar", run:
gcloud container binauthz attestations create --project=my_proj --artifact-url='gcr.io/example-project/example-image@sha256:abcd' --note=projects/foo/notes/bar --signature-file=signed_artifact_attestation.pgp.sig --public-key-id=AAAA0000000000000000FFFFFFFFFFFFFFFFFFFF--artifact-url=ARTIFACT_URLgcr.io/repository/image format, or may
optionally contain the http or https scheme
--public-key-id=PUBLIC_KEY_ID--signature-file=SIGNATURE_FILE- to read
signature from stdin.
--payload-file=PAYLOAD_FILEThis defaults to the output of the standard payload command:
gcloud container binauthz create-signature-payloadcontaineranalysis.notes.attachOccurrence permission for the Note
(usually via the containeranalysis.notes.attacher role). The
arguments in this group can be used to specify the attributes of this resource.
--note=NOTE
To set the note attribute:
--note on the command line.
--note-project=NOTE_PROJECTproject attribute:
--note on the command line with a fully
specified name;
--note-project on the command line.
--validatecontaineranalysis.notes.attachOccurrence permission
for the Attestor's underlying Note resource (usually via the
containeranalysis.notes.attacher role). The arguments in this group
can be used to specify the attributes of this resource.
--attestor=ATTESTOR
To set the name attribute:
--attestor on the command line.
--attestor-project=ATTESTOR_PROJECTproject attribute:
--attestor on the command line with a fully
specified name;
--attestor-project on the command line;
--project on the command line;
core/project.
--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud alpha container binauthz attestations creategcloud beta container binauthz attestations create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.