Skip to content

Conversation

mbg
Copy link
Member

@mbg mbg commented Sep 17, 2025

Fixes a bug with #3110, where we missed setting this header for toolcache.downloadTool that's needed to get the actual artifact, rather than the JSON metadata.

Better solution than #3119, since browser_download_url is intended for use by browsers.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@mbg mbg requested a review from a team as a code owner September 17, 2025 16:08
@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 16:08
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where the toolcache.downloadTool function was not properly downloading artifacts from GitHub releases due to a missing Accept header. The change adds the application/octet-stream header to ensure the actual binary artifact is downloaded instead of JSON metadata.

  • Adds the required Accept: application/octet-stream header to toolcache.downloadTool calls
  • Fixes the issue introduced in PR #3110 where downloads were returning metadata instead of actual artifacts

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/start-proxy-action.ts Adds Accept header configuration to downloadTool call for proxy binary download
lib/start-proxy-action.js Generated JavaScript version of the TypeScript changes

@mbg
Copy link
Member Author

mbg commented Sep 17, 2025

Successfully tested that this also works with the fallback in #3121: https://github.com/github/codeql-action/actions/runs/17805925098?pr=3121

Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for testing the fallback method!

@mbg mbg merged commit 802dd77 into update-bundle/codeql-bundle-v2.23.1 Sep 17, 2025
286 of 288 checks passed
@mbg mbg deleted the mbg/fix/proxy-download-2 branch September 17, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants