Accept GitHub release URLs in the tools input - #4179
Draft
henrymercer wants to merge 9 commits into
Draft
henrymercer wants to merge 9 commits into
henrymercer wants to merge 9 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ries Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
henrymercer
added this pull request to stack #4180
September 25, 2026 18:26
Contributor
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
Copilot review overview
🟡 Changes recommended
Mixed-case HTTPS release URLs are valid but are currently misclassified as local paths.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds support for GitHub release-page URLs in the tools input.
Changes:
- Resolves releases through the appropriate GitHub API or public URLs.
- Selects compatible bundles while safely controlling toolcache reuse.
- Adds documentation, changelog entries, and comprehensive tests.
| File | Description |
|---|---|
src/setup-codeql.ts |
Integrates release resolution, bundle selection, and caching rules. |
src/setup-codeql.test.ts |
Tests release downloads, fallback behavior, and caching. |
src/codeql-release.ts |
Parses release URLs and resolves release metadata. |
src/codeql-release.test.ts |
Tests parsing, version markers, and release lookup. |
src/codeql-bundle.ts |
Marks custom releases as non-cacheable. |
setup-codeql/action.yml |
Documents release URLs for setup-codeql. |
init/action.yml |
Documents release URLs for init. |
CHANGELOG.md |
Records the new input capability. |
lib/entry-points.js |
Generated artifact; content excluded from review. |
Files excluded by content exclusion policy (1)
- lib/entry-points.js
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+498
to
+501
| const requestedRelease = | ||
| toolsInput === undefined | ||
| ? undefined | ||
| : parseCodeQLReleaseUrl(toolsInput, apiDetails); |
This branch has not been deployed
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
toolsinput of theinitandsetup-codeqlactions now accepts a GitHub release URL, such ashttps://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.27.1, as well as the older/releases/codeql-bundle-<version>form. The Action selects a compatible bundle from that release, including a per-language bundle when the job can use one, using the bundle selection from #4172.parseCodeQLReleaseUrlrecognises release pages on the current GitHub instance or on github.com by comparing origins. It never treats asset URLs or REST API URLs as releases, so those keep their existing meaning. A release on the current instance is looked up with the API, which works for private and internal repositories. A release on github.com requested from GHES or GHE.com is downloaded by URL, without an API request or credentials, like the existing fallback to the public release. The CLI version comes from acli-version-<version>.txtasset if the release has one, and otherwise from the tag. As for the default bundle, it decides whether the job can use a per-language bundle and which compression method we prefer.The bundle always comes from the requested release. We never substitute a release from another repository, and a release URL takes precedence over the
force_nightlyfeature flag. If the release can't be found, setup fails with an error that names it, rather than the generic token error.Stable releases tagged
codeql-bundle-v<version>in the repositories we already download the default bundle from, this Action's repository andgithub/codeql-action, contain the same bundles as the default bundle for that version. They use and populate the toolcache in the same way. Other releases, such as release candidates, custom bundles and releases in other repositories, may contain a different build under the same version number, so we don't look them up in the toolcache or cache them.Known limitations:
Commit-by-commit review recommended. The first two commits document how CodeQL is versioned in the toolcache and move the toolcache lookup out of
getCodeQLSourcewithout changing it. The next three add the release URL parser, reading the CLI version from a release, and looking up a requested release. The sixth commit uses these to accept release URLs, and at that point release URLs never use the toolcache. The last two commits let stable releases in the CodeQL Action repositories use it.Risk assessment
Low risk: This only affects workflows that pass a release URL to the
toolsinput, which wasn't previously supported. Othertoolsinputs behave as before.Which use cases does this change impact?
Workflow types:
Products:
Environments:
How did/will you validate this change?
toolsinputs, but none of them use a release URL, so the new path relies on the unit tests.If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist