Skip to content

Commit

Permalink
Better help text to sign and verify SBOM (#2308)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Ciach <christian.ciach@emsysgrid.de>

Signed-off-by: Christian Ciach <christian.ciach@emsysgrid.de>
  • Loading branch information
ChristianCiach committed Oct 4, 2022
1 parent 693b545 commit 4f82d96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/cosign/cli/attach.go
Expand Up @@ -70,7 +70,7 @@ func attachSBOM() *cobra.Command {
if err != nil {
return err
}
fmt.Fprintf(os.Stderr, "WARNING: Attaching SBOMs this way does not sign them. If you want to sign them, use 'cosign attest -predicate %s -key <key path>' or 'cosign sign -key <key path> <sbom image>'.\n", o.SBOM)
fmt.Fprintf(os.Stderr, "WARNING: Attaching SBOMs this way does not sign them. If you want to sign them, use 'cosign attest --predicate %s --key <key path>' or 'cosign sign --key <key path> --attachment sbom <image uri>'.\n", o.SBOM)
return attach.SBOMCmd(cmd.Context(), o.Registry, o.SBOM, mediaType, args[0])
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cosign/cli/download.go
Expand Up @@ -68,7 +68,7 @@ func downloadSBOM() *cobra.Command {
Example: " cosign download sbom <image uri>",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Fprintln(os.Stderr, "WARNING: Downloading SBOMs this way does not ensure its authenticity. If you want to ensure a tamper-proof SBOM, download it using 'cosign download attestation <image uri>' or verify its signature.")
fmt.Fprintln(os.Stderr, "WARNING: Downloading SBOMs this way does not ensure its authenticity. If you want to ensure a tamper-proof SBOM, download it using 'cosign download attestation <image uri>' or verify its signature using 'cosign verify --key <key path> --attachment sbom <image uri>'.")
_, err := download.SBOMCmd(cmd.Context(), *o, *do, args[0], cmd.OutOrStdout())
return err
},
Expand Down

0 comments on commit 4f82d96

Please sign in to comment.