diff --git a/.github/download-latest-release.sh b/.github/download-latest-release.sh index 70c224b9b..2e7d097ea 100755 --- a/.github/download-latest-release.sh +++ b/.github/download-latest-release.sh @@ -22,7 +22,7 @@ echo "release-yaml=/tmp/release.yaml" >>"${GITHUB_OUTPUT}" # look at the first image, download the entrypoint to determine the Go version image="$(grep ghcr.io /tmp/release.yaml | sed -E 's/(image|value)://' | tr -d ' ' | head -n 1)" entrypoint="$(crane config "${image}" | jq -r '.config.Entrypoint[0]')" -crane export "${image}" - | tar -xf - -C /tmp "${entrypoint}" +crane export "${image}" - | tar -xf - -C /tmp "${entrypoint:1}" goVersion="$(go version "/tmp${entrypoint}" | sed "s#/tmp${entrypoint}: go##")" goVersion="${goVersion:0:4}" echo "[INFO] Go version is ${goVersion}" diff --git a/.github/report-release-vulnerabilities.sh b/.github/report-release-vulnerabilities.sh index 4a5809cdd..c905d6875 100755 --- a/.github/report-release-vulnerabilities.sh +++ b/.github/report-release-vulnerabilities.sh @@ -107,10 +107,10 @@ for image in "${images[@]}"; do # Go vulnerabilities echo " [INFO] Checking for Go vulnerabilities" echo "### Go vulnerabilities" >>/tmp/report.md - crane export "${image}" - | tar -xf - -C /tmp "${entrypoint}" + crane export "${image}" - | tar -xf - -C /tmp "${entrypoint:1}" goVulns="$(govulncheck -format json -mode binary "/tmp${entrypoint}")" goVulnsFound=false - cat /tmp/image.tar | crane export - - | tar -xf - -C /tmp "${entrypoint}" + cat /tmp/image.tar | crane export - - | tar -xf - -C /tmp "${entrypoint:1}" goVulnsLatest="$(govulncheck -format json -mode binary "/tmp${entrypoint}")" rm -f /tmp/image.tar "/tmp${entrypoint}" while read -r id pkg vulnerableVersion fixedVersion; do