Draft
Trim whitespace from codeql_version input in update-codeql-version workflow#220
Conversation
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix GitHub Actions workflow validation for codeql version
Trim whitespace from codeql_version input in update-codeql-version workflow
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Validate and normalize version inputstep stripped an optional leadingvbut never trimmed whitespace, so a dispatched value of" 2.26.3"failed the^[0-9]+\.[0-9]+\.[0-9]+$check withcodeql_version must look like X.Y.Z, got: 2.26.3.Changes
inputs.codeql_versionbefore thevprefix removal and theX.Y.Zregex check.$VERSIONinstead of re-interpolating${{ inputs.codeql_version }}, so the reported value is the one that actually failed the check, and the step interpolates the workflow expression into shell only once.2.26.3andv2.26.3remain accepted;2.26,2.26.3.4, values with internal whitespace, and empty/whitespace-only input are still rejected.Tests
No test added. The repository has no harness for exercising inline workflow shell steps (
.github/scripts/*.shhave no accompanying test suite), so the change was verified by extracting the step script and running it against the accept/reject cases above.