| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR modifies the start-proxy action to fetch proxy binaries from the current CodeQL CLI bundle release instead of a hard-coded release. The main purpose is to ensure the proxy binaries are always up-to-date with the CLI bundle version specified in defaults.json.
Key changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/start-proxy.ts | Adds new functions for dynamic proxy binary URL resolution and platform detection |
| src/start-proxy.test.ts | Adds unit tests for the new proxy binary discovery logic |
| src/start-proxy-action.ts | Updates proxy binary path resolution to use dynamic URL discovery |
| lib/start-proxy-action.js | Generated JavaScript code (no review needed per guidelines) |
Sorry, something went wrong.
| for (const asset of cliRelease.data.assets) { | ||
| if (asset.name === proxyPackage) { | ||
| logger.info( | ||
| `Found '${proxyPackage}' in release '${defaults.bundleVersion}' at '${asset.url}'`, |
There was a problem hiding this comment.
[nitpick] Logging the asset URL could potentially expose sensitive information. Consider logging only the asset name and release version instead of the full URL.
| `Found '${proxyPackage}' in release '${defaults.bundleVersion}' at '${asset.url}'`, | |
| `Found '${proxyPackage}' in release '${defaults.bundleVersion}'.`, |
Sorry, something went wrong.
There was a problem hiding this comment.
We include the asset URL in the log in setup-codeql.ts as well. I don't think there should be any sensitive information, since the releases are public.
Sorry, something went wrong.
| let proxyBin = toolcache.find(proxyFileName, proxyInfo.version); | ||
| if (!proxyBin) { | ||
| const temp = await toolcache.downloadTool(proxyURL); | ||
| const temp = await toolcache.downloadTool(proxyInfo.url); |
There was a problem hiding this comment.
The URL from proxyInfo.url is downloaded without validation. When using the GitHub API asset URL, consider adding verification that the URL is from a trusted GitHub domain to prevent potential security issues.
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good, couple of minor comments.
Sorry, something went wrong.
| export const UPDATEJOB_PROXY_VERSION = "v2.0.20250624110901"; | ||
| export const UPDATEJOB_PROXY_URL_PREFIX = | ||
| "https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.22.0/"; |
There was a problem hiding this comment.
Minor: Rename to include _FALLBACK_?
Sorry, something went wrong.
There was a problem hiding this comment.
I am not going to bother, since we can hopefully just remove the fallback logic once the next CodeQL CLI release has happened?
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Currently, the start-proxy action obtains the platform-specific update-job-proxy binary it needs from a hard-coded CodeQL CLI bundle release on the github/codeql-action repo, if it is not already in the runner's toolcache.
We will soon be including up-to-date versions of the update-job-proxy binaries with every CodeQL CLI bundle release.
This PR modifies the start-proxy action to search the release assets of the release pointed at by defaults.json for an appropriate update-job-proxy asset and downloads it, if it is not already in the runner's toolcache.
If the release pointed at by defaults.json doesn't contain the right asset for whatever reason, we revert to using the hard-coded release instead.
Because update-job-proxy isn't versioned, and we require a version for the toolcache, we use the CodeQL CLI version of the release the update-job-proxy is obtained from as its version.
I have added a few unit tests for this logic.
Risk assessment
For internal use only. Please select the risk level of this change:
Merge / deployment checklist