From 3e77678ed5996460bb21d3eec916c6ad7436b852 Mon Sep 17 00:00:00 2001 From: somaz Date: Fri, 5 Jun 2026 12:09:22 +0900 Subject: [PATCH] fix: report a clear error when chart-testing blob verification fails Signed-off-by: somaz --- ct.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ct.sh b/ct.sh index 93931e8..f597260 100755 --- a/ct.sh +++ b/ct.sh @@ -96,12 +96,10 @@ install_chart_testing() { CT_SIG=https://github.com/helm/chart-testing/releases/download/v${version}/chart-testing_${version#v}_linux_${arch}.tar.gz.sig curl --retry 5 --retry-delay 1 -sSLo ct.tar.gz "https://github.com/helm/chart-testing/releases/download/v${version}/chart-testing_${version#v}_linux_${arch}.tar.gz" - cosign verify-blob --certificate "${CT_CERT}" --signature "${CT_SIG}" \ + if ! cosign verify-blob --certificate "${CT_CERT}" --signature "${CT_SIG}" \ --certificate-identity "https://github.com/helm/chart-testing/.github/workflows/release.yaml@refs/heads/main" \ - --certificate-oidc-issuer "https://token.actions.githubusercontent.com" ct.tar.gz - retVal=$? - if [[ "${retVal}" -ne 0 ]]; then - log_error "Unable to validate chart-testing version: v${version}" + --certificate-oidc-issuer "https://token.actions.githubusercontent.com" ct.tar.gz; then + echo "ERROR: Unable to validate chart-testing version: v${version}" >&2 exit 1 fi