diff --git a/containers/Dockerfile b/containers/Dockerfile index b4d5fc953..ac816179e 100644 --- a/containers/Dockerfile +++ b/containers/Dockerfile @@ -186,7 +186,7 @@ RUN set -eux; \ aarch64|arm64) GITLEAKS_ARCH="arm64" ;; \ *) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;; \ esac; \ - TAG="$(curl -fsSL https://api.github.com/repos/gitleaks/gitleaks/releases/latest | jq -r .tag_name)"; \ + TAG="$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/gitleaks/gitleaks/releases/latest | sed 's#.*/##')"; \ curl -fsSL "https://github.com/gitleaks/gitleaks/releases/download/${TAG}/gitleaks_${TAG#v}_linux_${GITLEAKS_ARCH}.tar.gz" -o /tmp/gitleaks.tgz; \ tar -xzf /tmp/gitleaks.tgz -C /tmp; \ install -m 0755 /tmp/gitleaks /usr/local/bin/gitleaks; \