Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding verify blob commands #889

Closed

Conversation

rrsemlani
Copy link

Adding verify blob commands.
Spec Pr used for ref: #811

Long: longMessage,
Args: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
return errors.New("missing signature/blob path to the artifact: use `notation blob verify --help` to see what parameters are required")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return errors.New("missing signature/blob path to the artifact: use `notation blob verify --help` to see what parameters are required")
return errors.New("missing signature/blob path to the artifact: use `notation blob verify --help` to see what parameters are required")
Suggested change
return errors.New("missing signature/blob path to the artifact: use `notation blob verify --help` to see what parameters are required")
return errors.New("missing blob path: use `notation blob verify --help` to see what parameters are required")

Comment on lines +64 to +65
opts.signaturePath = args[0]
opts.blobPath = args[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we adding blob path to signature path ?

Comment on lines +69 to +71
if opts.maxSignatureAttempts <= 0 {
return fmt.Errorf("max-signatures value %d must be a positive number", opts.maxSignatureAttempts)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

return runVerify(cmd, opts)
},
}
command.Flags().StringArrayVar(&opts.pluginConfig, "plugin-config", nil, "{key}={value} pairs that are passed as it is to a plugin, if the verification is associated with a verification plugin, refer plugin documentation to set appropriate values")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we missing opts.LoggingFlagOpts.ApplyFlags(command.Flags()) ?

also one for signature path and policy name?

}
command.Flags().StringArrayVar(&opts.pluginConfig, "plugin-config", nil, "{key}={value} pairs that are passed as it is to a plugin, if the verification is associated with a verification plugin, refer plugin documentation to set appropriate values")
cmd.SetPflagUserMetadata(command.Flags(), &opts.userMetadata, cmd.PflagUserMetadataVerifyUsage)
command.Flags().IntVar(&opts.maxSignatureAttempts, "max-signatures", 100, "maximum number of signatures to evaluate or examine")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link

github-actions bot commented Apr 7, 2024

This PR is stale because it has been opened for 45 days with no activity. Remove stale label or comment. Otherwise, it will be closed in 30 days.

@github-actions github-actions bot added the Stale label Apr 7, 2024
Copy link

github-actions bot commented May 7, 2024

PR closed due to no activity in the past 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants