From 741be6fd6b8ee6a1d777ea020076b70c6233b3a1 Mon Sep 17 00:00:00 2001 From: erikeverts <81747172+erikeverts@users.noreply.github.com> Date: Mon, 21 Mar 2022 16:18:35 +0100 Subject: [PATCH] Change git:// to https:// (#5) Co-authored-by: Peiman Jafari <18074432+peimanja@users.noreply.github.com> --- CHANGELOG.md | 3 +++ src/main.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54e65c7..1367417 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,3 +2,6 @@ ## v0.0.1 Initial release. only supporting `promtool check rules` and `promtool check config` + +## v0.0.2 +Changed unauthenticated git:// call to https:// to overcome issues documented here https://github.blog/2021-09-01-improving-git-protocol-security-github/ diff --git a/src/main.sh b/src/main.sh index e2d4f25..d969315 100755 --- a/src/main.sh +++ b/src/main.sh @@ -32,7 +32,7 @@ function parseInputs { function installPromtool { if [[ "${promtoolVersion}" == "latest" ]]; then echo "Checking the latest version of Promtool" - promtoolVersion=$(git ls-remote --tags --refs --sort="v:refname" git://github.com/prometheus/prometheus | grep -v '[-].*' | tail -n1 | sed 's/.*\///' | cut -c 2-) + promtoolVersion=$(git ls-remote --tags --refs --sort="v:refname" https://github.com/prometheus/prometheus | grep -v '[-].*' | tail -n1 | sed 's/.*\///' | cut -c 2-) if [[ -z "${promtoolVersion}" ]]; then echo "Failed to fetch the latest version" exit 1