Skip to content

Commit dcb3bc9

Browse files
committed
docs: improve doc for --no-upload option
This change adds documentation to the `no-upload` option of the `cosign attest` command to clarify that when the option is used, the produced attestation is written to STDOUT Signed-off-by: Travis Truman <[email protected]>
1 parent 56d5114 commit dcb3bc9

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

cmd/cosign/cli/attest.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ func Attest() *cobra.Command {
5959
# supply attestation via stdin
6060
echo <PAYLOAD> | cosign attest --predicate - <IMAGE>
6161
62+
# write attestation to stdout
63+
cosign attest --predicate <FILE> --type <TYPE> --key cosign.key --no-upload true <IMAGE>
64+
6265
# attach an attestation to a container image and honor the creation timestamp of the signature
6366
cosign attest --predicate <FILE> --type <TYPE> --key cosign.key --record-creation-timestamp <IMAGE>`,
6467

cmd/cosign/cli/options/attest.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ func (o *AttestOptions) AddFlags(cmd *cobra.Command) {
7474
_ = cmd.MarkFlagFilename("certificate-chain", certificateExts...)
7575

7676
cmd.Flags().BoolVar(&o.NoUpload, "no-upload", false,
77-
"do not upload the generated attestation")
78-
77+
"do not upload the generated attestation, but send the attestation output to STDOUT")
7978
cmd.Flags().BoolVarP(&o.Replace, "replace", "", false,
8079
"")
8180

doc/cosign_attest.md

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)