From 9075db324e330cb7f09920f94471ebbde8ad0d8f Mon Sep 17 00:00:00 2001 From: LiZhenCheng9527 Date: Sat, 27 Jan 2024 17:14:00 +0800 Subject: [PATCH] add double quote in image-sign.sh to prevent globbing and word splitting Signed-off-by: LiZhenCheng9527 --- hack/image-sign.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hack/image-sign.sh b/hack/image-sign.sh index e96bf8b07..6913ad268 100755 --- a/hack/image-sign.sh +++ b/hack/image-sign.sh @@ -7,11 +7,11 @@ SIGN_IMAGE=${SIGN_IMAGE:-"0"} CLUSTER_OPERATOR_IMAGE=${CLUSTER_OPERATOR_IMAGE:-"${IMAGE_HUB}/cluster-operator:${IMAGE_TAG}"} FLEET_MANAGER_IMAGE=${FLEET_MANAGER_IMAGE:-"${IMAGE_HUB}/fleet-manager:${IMAGE_TAG}"} -if [ $SIGN_IMAGE = "1" ]; then - echo "Sign image: "${CLUSTER_OPERATOR_IMAGE} - cosign sign --yes ${CLUSTER_OPERATOR_IMAGE} - echo "Sign image: "${FLEET_MANAGER_IMAGE} - cosign sign --yes ${FLEET_MANAGER_IMAGE} +if [ "$SIGN_IMAGE" = "1" ]; then + echo "Sign image: ""${CLUSTER_OPERATOR_IMAGE}" + cosign sign --yes "${CLUSTER_OPERATOR_IMAGE}" + echo "Sign image: ""${FLEET_MANAGER_IMAGE}" + cosign sign --yes "${FLEET_MANAGER_IMAGE}" else echo "Warning: The build image is not signed" fi