1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15- package cli
15+ package dockerfile
1616
1717import (
1818 "bufio"
@@ -25,24 +25,25 @@ import (
2525
2626 "github.com/peterbourgon/ff/v3/ffcli"
2727 "github.com/pkg/errors"
28+ "github.com/sigstore/cosign/cmd/cosign/cli"
2829)
2930
3031// VerifyCommand verifies a signature on a supplied container image
3132type VerifyDockerfileCommand struct {
32- VerifyCommand
33+ cli. VerifyCommand
3334 BaseOnly bool
3435}
3536
3637// Verify builds and returns an ffcli command
3738func VerifyDockerfile () * ffcli.Command {
38- cmd := VerifyDockerfileCommand {VerifyCommand : VerifyCommand {}}
39- flagset := flag .NewFlagSet ("cosign verify- dockerfile" , flag .ExitOnError )
39+ cmd := VerifyDockerfileCommand {VerifyCommand : cli. VerifyCommand {}}
40+ flagset := flag .NewFlagSet ("cosign dockerfile verify " , flag .ExitOnError )
4041 flagset .BoolVar (& cmd .BaseOnly , "base-image-only" , false , "only verify the base image (the last FROM image in the Dockerfile)" )
41- applyVerifyFlags (& cmd .VerifyCommand , flagset )
42+ cli . ApplyVerifyFlags (& cmd .VerifyCommand , flagset )
4243
4344 return & ffcli.Command {
44- Name : "verify-dockerfile " ,
45- ShortUsage : "cosign verify- dockerfile -key <key path>|<key url>|<kms uri> <path/to/Dockerfile>" ,
45+ Name : "verify" ,
46+ ShortUsage : "cosign dockerfile verify -key <key path>|<key url>|<kms uri> <path/to/Dockerfile>" ,
4647 ShortHelp : "Verify a signature on the base image specified in the Dockerfile" ,
4748 LongHelp : `Verify signature and annotations on images in a Dockerfile by checking claims
4849against the transparency log.
@@ -51,34 +52,34 @@ Shell-like variables in the Dockerfile's FROM lines will be substituted with val
5152
5253EXAMPLES
5354 # verify cosign claims and signing certificates on the FROM images in the Dockerfile
54- cosign verify- dockerfile <path/to/Dockerfile>
55+ cosign dockerfile verify <path/to/Dockerfile>
5556
5657 # only verify the base image (the last FROM image)
57- cosign verify- dockerfile -base-image-only <path/to/Dockerfile>
58+ cosign dockerfile verify -base-image-only <path/to/Dockerfile>
5859
5960 # additionally verify specified annotations
60- cosign verify- dockerfile -a key1=val1 -a key2=val2 <path/to/Dockerfile>
61+ cosign dockerfile verify -a key1=val1 -a key2=val2 <path/to/Dockerfile>
6162
6263 # (experimental) additionally, verify with the transparency log
63- COSIGN_EXPERIMENTAL=1 cosign verify- dockerfile <path/to/Dockerfile>
64+ COSIGN_EXPERIMENTAL=1 cosign dockerfile verify <path/to/Dockerfile>
6465
6566 # verify images with public key
66- cosign verify- dockerfile -key cosign.pub <path/to/Dockerfile>
67+ cosign dockerfile verify -key cosign.pub <path/to/Dockerfile>
6768
6869 # verify images with public key provided by URL
69- cosign verify- dockerfile -key https://host.for/<FILE> <path/to/Dockerfile>
70+ cosign dockerfile verify -key https://host.for/<FILE> <path/to/Dockerfile>
7071
7172 # verify images with public key stored in Azure Key Vault
72- cosign verify- dockerfile -key azurekms://[VAULT_NAME][VAULT_URI]/[KEY] <path/to/Dockerfile>
73+ cosign dockerfile verify -key azurekms://[VAULT_NAME][VAULT_URI]/[KEY] <path/to/Dockerfile>
7374
7475 # verify images with public key stored in AWS KMS
75- cosign verify- dockerfile -key awskms://[ENDPOINT]/[ID/ALIAS/ARN] <path/to/Dockerfile>
76+ cosign dockerfile verify -key awskms://[ENDPOINT]/[ID/ALIAS/ARN] <path/to/Dockerfile>
7677
7778 # verify images with public key stored in Google Cloud KMS
78- cosign verify- dockerfile -key gcpkms://projects/[PROJECT]/locations/global/keyRings/[KEYRING]/cryptoKeys/[KEY] <path/to/Dockerfile>
79+ cosign dockerfile verify -key gcpkms://projects/[PROJECT]/locations/global/keyRings/[KEYRING]/cryptoKeys/[KEY] <path/to/Dockerfile>
7980
8081 # verify images with public key stored in Hashicorp Vault
81- cosign verify- dockerfile -key hashivault://[KEY] <path/to/Dockerfile>` ,
82+ cosign dockerfile verify -key hashivault://[KEY] <path/to/Dockerfile>` ,
8283
8384 FlagSet : flagset ,
8485 Exec : cmd .Exec ,
0 commit comments