Skip to content

Commit bb96019

Browse files
Copilotdata-douser
andcommitted
Add validation for empty latest_tag in update-codeql workflow
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
1 parent 4b2baa0 commit bb96019

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/update-codeql.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ jobs:
4444
4545
# Get latest release from codeql-cli-binaries
4646
latest_tag=$(gh release list --repo github/codeql-cli-binaries --json 'tagName,isLatest' --jq '.[] | select(.isLatest == true) | .tagName')
47+
48+
# Validate that we found a latest release
49+
if [ -z "${latest_tag}" ]; then
50+
echo "❌ Error: Could not determine latest CodeQL CLI version from github/codeql-cli-binaries" >&2
51+
echo "No release marked as 'latest' was found. This may indicate an API issue or repository change." >&2
52+
exit 1
53+
fi
54+
4755
latest_clean="${latest_tag#v}"
4856
4957
echo "Current CodeQL CLI version: ${current_version}"

0 commit comments

Comments
 (0)