Skip to content

Commit

Permalink
chore: add warning when downloading a sBOM (#1763)
Browse files Browse the repository at this point in the history
Signed-off-by: hectorj2f <hectorf@vmware.com>
  • Loading branch information
Hector Fernandez committed Apr 15, 2022
1 parent 920dcfa commit 3af58ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/cosign/cli/download.go
Expand Up @@ -16,6 +16,9 @@
package cli

import (
"fmt"
"os"

"github.com/spf13/cobra"

"github.com/sigstore/cosign/cmd/cosign/cli/download"
Expand Down Expand Up @@ -64,6 +67,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.")
_, err := download.SBOMCmd(cmd.Context(), *o, args[0], cmd.OutOrStdout())
return err
},
Expand Down

0 comments on commit 3af58ac

Please sign in to comment.