diff --git a/pkg/cmd/attestation/download/download.go b/pkg/cmd/attestation/download/download.go index cbaef21ff..fd887ce67 100644 --- a/pkg/cmd/attestation/download/download.go +++ b/pkg/cmd/attestation/download/download.go @@ -102,7 +102,6 @@ func NewDownloadCmd(f *cmdutil.Factory, runF func(*Options) error) *cobra.Comman downloadCmd.MarkFlagsOneRequired("owner", "repo") cmdutil.StringEnumFlag(downloadCmd, &opts.DigestAlgorithm, "digest-alg", "d", "sha256", []string{"sha256", "sha512"}, "The algorithm used to compute a digest of the artifact") downloadCmd.Flags().IntVarP(&opts.Limit, "limit", "L", api.DefaultLimit, "Maximum number of attestations to fetch") - downloadCmd.Flags().BoolVarP(&opts.Verbose, "verbose", "v", false, "If set to true, the CLI will output verbose information.") return downloadCmd } diff --git a/pkg/cmd/attestation/download/options.go b/pkg/cmd/attestation/download/options.go index cb9cb8978..6a64ecc30 100644 --- a/pkg/cmd/attestation/download/options.go +++ b/pkg/cmd/attestation/download/options.go @@ -23,7 +23,6 @@ type Options struct { OCIClient oci.Client Owner string Repo string - Verbose bool } func (opts *Options) AreFlagsValid() error { diff --git a/pkg/cmd/attestation/inspect/inspect.go b/pkg/cmd/attestation/inspect/inspect.go index a41922c88..8ee353290 100644 --- a/pkg/cmd/attestation/inspect/inspect.go +++ b/pkg/cmd/attestation/inspect/inspect.go @@ -85,9 +85,6 @@ func NewInspectCmd(f *cmdutil.Factory, runF func(*Options) error) *cobra.Command inspectCmd.MarkFlagRequired("bundle") //nolint:errcheck cmdutil.StringEnumFlag(inspectCmd, &opts.DigestAlgorithm, "digest-alg", "d", "sha256", []string{"sha256", "sha512"}, "The algorithm used to compute a digest of the artifact") inspectCmd.Flags().BoolVarP(&opts.JsonResult, "json-result", "j", false, "Output inspect result as JSON lines") - inspectCmd.Flags().BoolVarP(&opts.Quiet, "quiet", "q", false, "If set to true, the CLI will not print any diagnostic logging.") - inspectCmd.Flags().BoolVarP(&opts.Verbose, "verbose", "v", false, "If set to true, the CLI will print verbose diagnostic logging.") - inspectCmd.MarkFlagsMutuallyExclusive("quiet", "verbose") return inspectCmd } diff --git a/pkg/cmd/attestation/inspect/inspect_test.go b/pkg/cmd/attestation/inspect/inspect_test.go index a3cc6a6de..092e24aaf 100644 --- a/pkg/cmd/attestation/inspect/inspect_test.go +++ b/pkg/cmd/attestation/inspect/inspect_test.go @@ -89,19 +89,6 @@ func TestNewInspectCmd(t *testing.T) { }, wantsErr: true, }, - { - name: "Has both verbose and quiet flags", - cli: "../test/data/sigstore-js-2.1.0.tgz --bundle ../test/data/sigstore-js-2.1.0-bundle.json --verbose --quiet", - wants: Options{ - ArtifactPath: "../test/data/sigstore-js-2.1.0.tgz", - BundlePath: "../test/data/sigstore-js-2.1.0-bundle.json", - DigestAlgorithm: "sha256", - OCIClient: oci.MockClient{}, - Verbose: true, - Quiet: true, - }, - wantsErr: true, - }, } for _, tc := range testcases { @@ -129,8 +116,6 @@ func TestNewInspectCmd(t *testing.T) { assert.Equal(t, tc.wants.BundlePath, opts.BundlePath) assert.Equal(t, tc.wants.DigestAlgorithm, opts.DigestAlgorithm) assert.Equal(t, tc.wants.JsonResult, opts.JsonResult) - assert.Equal(t, tc.wants.Verbose, opts.Verbose) - assert.Equal(t, tc.wants.Quiet, opts.Quiet) }) } } diff --git a/pkg/cmd/attestation/inspect/options.go b/pkg/cmd/attestation/inspect/options.go index 1831190aa..758a93674 100644 --- a/pkg/cmd/attestation/inspect/options.go +++ b/pkg/cmd/attestation/inspect/options.go @@ -13,8 +13,6 @@ type Options struct { BundlePath string DigestAlgorithm string JsonResult bool - Verbose bool - Quiet bool Logger *io.Handler OCIClient oci.Client } diff --git a/pkg/cmd/attestation/verify/options.go b/pkg/cmd/attestation/verify/options.go index de23679fd..f1ac213d5 100644 --- a/pkg/cmd/attestation/verify/options.go +++ b/pkg/cmd/attestation/verify/options.go @@ -21,11 +21,9 @@ type Options struct { NoPublicGood bool OIDCIssuer string Owner string - Quiet bool Repo string SAN string SANRegex string - Verbose bool APIClient api.Client Logger *io.Handler Limit int diff --git a/pkg/cmd/attestation/verify/verify.go b/pkg/cmd/attestation/verify/verify.go index b1d4884a3..323a6d281 100644 --- a/pkg/cmd/attestation/verify/verify.go +++ b/pkg/cmd/attestation/verify/verify.go @@ -121,9 +121,6 @@ func NewVerifyCmd(f *cmdutil.Factory, runF func(*Options) error) *cobra.Command verifyCmd.MarkFlagsOneRequired("owner", "repo") verifyCmd.Flags().BoolVarP(&opts.NoPublicGood, "no-public-good", "", false, "Only verify attestations signed with GitHub's Sigstore instance") verifyCmd.Flags().BoolVarP(&opts.JsonResult, "json-result", "j", false, "Output verification result as JSON lines") - verifyCmd.Flags().BoolVarP(&opts.Quiet, "quiet", "q", false, "If set to true, the CLI will not print any diagnostic logging.") - verifyCmd.Flags().BoolVarP(&opts.Verbose, "verbose", "v", false, "If set to true, the CLI will print verbose diagnostic logging.") - verifyCmd.MarkFlagsMutuallyExclusive("quiet", "verbose") verifyCmd.Flags().StringVarP(&opts.CustomTrustedRoot, "custom-trusted-root", "", "", "Path to a custom trustedroot.json file to use for verification") verifyCmd.Flags().IntVarP(&opts.Limit, "limit", "L", api.DefaultLimit, "Maximum number of attestations to fetch") // policy enforcement flags diff --git a/pkg/cmd/attestation/verify/verify_test.go b/pkg/cmd/attestation/verify/verify_test.go index 86d40b32c..5878b44a3 100644 --- a/pkg/cmd/attestation/verify/verify_test.go +++ b/pkg/cmd/attestation/verify/verify_test.go @@ -152,19 +152,6 @@ func TestNewVerifyCmd(t *testing.T) { }, wantsErr: true, }, - { - name: "Has both verbose and quiet flags", - cli: "../test/data/sigstore-js-2.1.0.tgz --bundle ../test/data/sigstore-js-2.1.0-bundle.json --owner sigstore --verbose --quiet", - wants: Options{ - ArtifactPath: "../test/data/sigstore-js-2.1.0.tgz", - BundlePath: "../test/data/sigstore-js-2.1.0-bundle.json", - DigestAlgorithm: "sha256", - OIDCIssuer: GitHubOIDCIssuer, - Verbose: true, - Quiet: true, - }, - wantsErr: true, - }, { name: "Has both cert-identity and cert-identity-regex flags", cli: "../test/data/sigstore-js-2.1.0.tgz --owner sigstore --cert-identity https://github.com/sigstore/ --cert-identity-regex ^https://github.com/sigstore/", @@ -212,11 +199,9 @@ func TestNewVerifyCmd(t *testing.T) { assert.Equal(t, tc.wants.NoPublicGood, opts.NoPublicGood) assert.Equal(t, tc.wants.OIDCIssuer, opts.OIDCIssuer) assert.Equal(t, tc.wants.Owner, opts.Owner) - assert.Equal(t, tc.wants.Quiet, opts.Quiet) assert.Equal(t, tc.wants.Repo, opts.Repo) assert.Equal(t, tc.wants.SAN, opts.SAN) assert.Equal(t, tc.wants.SANRegex, opts.SANRegex) - assert.Equal(t, tc.wants.Verbose, opts.Verbose) }) } }