diff --git a/cli/slsa-verifier/verify.go b/cli/slsa-verifier/verify.go index 82eb51e..5da05ef 100644 --- a/cli/slsa-verifier/verify.go +++ b/cli/slsa-verifier/verify.go @@ -32,7 +32,13 @@ func verifyArtifactCmd() *cobra.Command { o := &verify.VerifyOptions{} cmd := &cobra.Command{ - Use: "verify-artifact [flags] artifact [artifact..]", + Use: "verify-artifact [flags] artifact [artifact..]", + Args: func(cmd *cobra.Command, args []string) error { + if len(args) < 1 { + return errors.New("expects at least one artifact") + } + return nil + }, Short: "Verifies SLSA provenance on artifact blobs given as arguments (assuming same provenance)", RunE: func(cmd *cobra.Command, args []string) error { v := verify.VerifyArtifactCommand{