From 19bc6279738fa88b2605c3948c835b649ac93c75 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Thu, 5 Mar 2026 23:41:41 +0300 Subject: [PATCH] fix(ssh): add argument validation to webhook deliveries commands --- pkg/ssh/cmd/webhooks.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/ssh/cmd/webhooks.go b/pkg/ssh/cmd/webhooks.go index 5f156672651d74d356ee5297d15c5679d034674e..6312b909baac7c31fd246683dba33284226778d9 100644 --- a/pkg/ssh/cmd/webhooks.go +++ b/pkg/ssh/cmd/webhooks.go @@ -313,6 +313,7 @@ func webhookDeliveriesRedeliverCommand() *cobra.Command { cmd := &cobra.Command{ Use: "redeliver REPOSITORY WEBHOOK_ID DELIVERY_ID", Short: "Redeliver a webhook delivery", + Args: cobra.ExactArgs(3), PersistentPreRunE: checkIfAdmin, RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() @@ -343,6 +344,7 @@ func webhookDeliveriesGetCommand() *cobra.Command { cmd := &cobra.Command{ Use: "get REPOSITORY WEBHOOK_ID DELIVERY_ID", Short: "Get a webhook delivery", + Args: cobra.ExactArgs(3), PersistentPreRunE: checkIfAdmin, RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context()