Compare commits

..

5 Commits

Author SHA1 Message Date
Zsolt Dollenstein
2f9f369997 Limit GitHub tokens to github.com download URLs 2026-05-11 17:52:04 +01:00
github-actions[bot]
88aa608651 chore: update known checksums for 0.11.13 (#877)
chore: update known checksums for 0.11.13

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-11 08:14:58 +02:00
github-actions[bot]
00714ea9dc chore: update known checksums for 0.11.12 (#876)
chore: update known checksums for 0.11.12

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-09 08:17:00 +02:00
dependabot[bot]
c4fec0d78d chore(deps): bump github/codeql-action from 4.32.2 to 4.35.3 (#875)
Bumps [github/codeql-action](https://github.com/github/codeql-action)
from 4.32.2 to 4.35.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v4.35.3</h2>
<ul>
<li><em>Upcoming breaking change</em>: Add a deprecation warning for
customers using CodeQL version 2.19.3 and earlier. These versions of
CodeQL were discontinued on 9 April 2026 alongside GitHub Enterprise
Server 3.15, and will be unsupported by the next minor release of the
CodeQL Action. <a
href="https://redirect.github.com/github/codeql-action/pull/3837">#3837</a></li>
<li>Configurations for private registries that use Cloudsmith or GCP
OIDC are now accepted. <a
href="https://redirect.github.com/github/codeql-action/pull/3850">#3850</a></li>
<li>Best-effort connection tests for private registries now use
<code>GET</code> requests instead of <code>HEAD</code> for better
compatibility with various registry implementations. For NuGet feeds,
the test is now always performed against the service index. <a
href="https://redirect.github.com/github/codeql-action/pull/3853">#3853</a></li>
<li>Fixed a bug where two diagnostics produced within the same
millisecond could overwrite each other on disk, causing one of them to
be lost. <a
href="https://redirect.github.com/github/codeql-action/pull/3852">#3852</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.3">2.25.3</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3865">#3865</a></li>
</ul>
<h2>v4.35.2</h2>
<ul>
<li>The undocumented TRAP cache cleanup feature that could be enabled
using the <code>CODEQL_ACTION_CLEANUP_TRAP_CACHES</code> environment
variable is deprecated and will be removed in May 2026. If you are
affected by this, we recommend disabling TRAP caching by passing the
<code>trap-caching: false</code> input to the <code>init</code> Action.
<a
href="https://redirect.github.com/github/codeql-action/pull/3795">#3795</a></li>
<li>The Git version 2.36.0 requirement for improved incremental analysis
now only applies to repositories that contain submodules. <a
href="https://redirect.github.com/github/codeql-action/pull/3789">#3789</a></li>
<li>Python analysis on GHES no longer extracts the standard library,
relying instead on models of the standard library. This should result in
significantly faster extraction and analysis times, while the effect on
alerts should be minimal. <a
href="https://redirect.github.com/github/codeql-action/pull/3794">#3794</a></li>
<li>Fixed a bug in the validation of OIDC configurations for private
registries that was added in CodeQL Action 4.33.0 / 3.33.0. <a
href="https://redirect.github.com/github/codeql-action/pull/3807">#3807</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.2">2.25.2</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3823">#3823</a></li>
</ul>
<h2>v4.35.1</h2>
<ul>
<li>Fix incorrect minimum required Git version for <a
href="https://redirect.github.com/github/roadmap/issues/1158">improved
incremental analysis</a>: it should have been 2.36.0, not 2.11.0. <a
href="https://redirect.github.com/github/codeql-action/pull/3781">#3781</a></li>
</ul>
<h2>v4.35.0</h2>
<ul>
<li>Reduced the minimum Git version required for <a
href="https://redirect.github.com/github/roadmap/issues/1158">improved
incremental analysis</a> from 2.38.0 to 2.11.0. <a
href="https://redirect.github.com/github/codeql-action/pull/3767">#3767</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.1">2.25.1</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3773">#3773</a></li>
</ul>
<h2>v4.34.1</h2>
<ul>
<li>Downgrade default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.3">2.24.3</a>
due to issues with a small percentage of Actions and JavaScript
analyses. <a
href="https://redirect.github.com/github/codeql-action/pull/3762">#3762</a></li>
</ul>
<h2>v4.34.0</h2>
<ul>
<li>Added an experimental change which disables TRAP caching when <a
href="https://redirect.github.com/github/roadmap/issues/1158">improved
incremental analysis</a> is enabled, since improved incremental analysis
supersedes TRAP caching. This will improve performance and reduce
Actions cache usage. We expect to roll this change out to everyone in
March. <a
href="https://redirect.github.com/github/codeql-action/pull/3569">#3569</a></li>
<li>We are rolling out improved incremental analysis to C/C++ analyses
that use build mode <code>none</code>. We expect this rollout to be
complete by the end of April 2026. <a
href="https://redirect.github.com/github/codeql-action/pull/3584">#3584</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.0">2.25.0</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3585">#3585</a></li>
</ul>
<h2>v4.33.0</h2>
<ul>
<li>
<p>Upcoming change: Starting April 2026, the CodeQL Action will skip
collecting file coverage information on pull requests to improve
analysis performance. File coverage information will still be computed
on non-PR analyses. Pull request analyses will log a warning about this
upcoming change. <a
href="https://redirect.github.com/github/codeql-action/pull/3562">#3562</a></p>
<p>To opt out of this change:</p>
<ul>
<li><strong>Repositories owned by an organization:</strong> Create a
custom repository property with the name
<code>github-codeql-file-coverage-on-prs</code> and the type
&quot;True/false&quot;, then set this property to <code>true</code> in
the repository's settings. For more information, see <a
href="https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization">Managing
custom properties for repositories in your organization</a>.
Alternatively, if you are using an advanced setup workflow, you can set
the <code>CODEQL_ACTION_FILE_COVERAGE_ON_PRS</code> environment variable
to <code>true</code> in your workflow.</li>
<li><strong>User-owned repositories using default setup:</strong> Switch
to an advanced setup workflow and set the
<code>CODEQL_ACTION_FILE_COVERAGE_ON_PRS</code> environment variable to
<code>true</code> in your workflow.</li>
<li><strong>User-owned repositories using advanced setup:</strong> Set
the <code>CODEQL_ACTION_FILE_COVERAGE_ON_PRS</code> environment variable
to <code>true</code> in your workflow.</li>
</ul>
</li>
<li>
<p>Fixed <a
href="https://redirect.github.com/github/codeql-action/issues/3555">a
bug</a> which caused the CodeQL Action to fail loading repository
properties if a &quot;Multi select&quot; repository property was
configured for the repository. <a
href="https://redirect.github.com/github/codeql-action/pull/3557">#3557</a></p>
</li>
<li>
<p>The CodeQL Action now loads <a
href="https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization">custom
repository properties</a> on GitHub Enterprise Server, enabling the
customization of features such as
<code>github-codeql-disable-overlay</code> that was previously only
available on GitHub.com. <a
href="https://redirect.github.com/github/codeql-action/pull/3559">#3559</a></p>
</li>
<li>
<p>Once <a
href="https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries">private
package registries</a> can be configured with OIDC-based authentication
for organizations, the CodeQL Action will now be able to accept such
configurations. <a
href="https://redirect.github.com/github/codeql-action/pull/3563">#3563</a></p>
</li>
<li>
<p>Fixed the retry mechanism for database uploads. Previously this would
fail with the error &quot;Response body object should not be disturbed
or locked&quot;. <a
href="https://redirect.github.com/github/codeql-action/pull/3564">#3564</a></p>
</li>
<li>
<p>A warning is now emitted if the CodeQL Action detects a repository
property whose name suggests that it relates to the CodeQL Action, but
which is not one of the properties recognised by the current version of
the CodeQL Action. <a
href="https://redirect.github.com/github/codeql-action/pull/3570">#3570</a></p>
</li>
</ul>
<h2>v4.32.6</h2>
<ul>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.3">2.24.3</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3548">#3548</a></li>
</ul>
<h2>v4.32.5</h2>
<ul>
<li>Repositories owned by an organization can now set up the
<code>github-codeql-disable-overlay</code> custom repository property to
disable <a
href="https://redirect.github.com/github/roadmap/issues/1158">improved
incremental analysis for CodeQL</a>. First, create a custom repository
property with the name <code>github-codeql-disable-overlay</code> and
the type &quot;True/false&quot; in the organization's settings. Then in
the repository's settings, set this property to <code>true</code> to
disable improved incremental analysis. For more information, see <a
href="https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization">Managing
custom properties for repositories in your organization</a>. This
feature is not yet available on GitHub Enterprise Server. <a
href="https://redirect.github.com/github/codeql-action/pull/3507">#3507</a></li>
<li>Added an experimental change so that when <a
href="https://redirect.github.com/github/roadmap/issues/1158">improved
incremental analysis</a> fails on a runner — potentially due to
insufficient disk space — the failure is recorded in the Actions cache
so that subsequent runs will automatically skip improved incremental
analysis until something changes (e.g. a larger runner is provisioned or
a new CodeQL version is released). We expect to roll this change out to
everyone in March. <a
href="https://redirect.github.com/github/codeql-action/pull/3487">#3487</a></li>
<li>The minimum memory check for improved incremental analysis is now
skipped for CodeQL 2.24.3 and later, which has reduced peak RAM usage.
<a
href="https://redirect.github.com/github/codeql-action/pull/3515">#3515</a></li>
<li>Reduced log levels for best-effort private package registry
connection check failures to reduce noise from workflow annotations. <a
href="https://redirect.github.com/github/codeql-action/pull/3516">#3516</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's
changelog</a>.</em></p>
<blockquote>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>[UNRELEASED]</h2>
<ul>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.4">2.25.4</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3881">#3881</a></li>
</ul>
<h2>4.35.3 - 01 May 2026</h2>
<ul>
<li><em>Upcoming breaking change</em>: Add a deprecation warning for
customers using CodeQL version 2.19.3 and earlier. These versions of
CodeQL were discontinued on 9 April 2026 alongside GitHub Enterprise
Server 3.15, and will be unsupported by the next minor release of the
CodeQL Action. <a
href="https://redirect.github.com/github/codeql-action/pull/3837">#3837</a></li>
<li>Configurations for private registries that use Cloudsmith or GCP
OIDC are now accepted. <a
href="https://redirect.github.com/github/codeql-action/pull/3850">#3850</a></li>
<li>Best-effort connection tests for private registries now use
<code>GET</code> requests instead of <code>HEAD</code> for better
compatibility with various registry implementations. For NuGet feeds,
the test is now always performed against the service index. <a
href="https://redirect.github.com/github/codeql-action/pull/3853">#3853</a></li>
<li>Fixed a bug where two diagnostics produced within the same
millisecond could overwrite each other on disk, causing one of them to
be lost. <a
href="https://redirect.github.com/github/codeql-action/pull/3852">#3852</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.3">2.25.3</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3865">#3865</a></li>
</ul>
<h2>4.35.2 - 15 Apr 2026</h2>
<ul>
<li>The undocumented TRAP cache cleanup feature that could be enabled
using the <code>CODEQL_ACTION_CLEANUP_TRAP_CACHES</code> environment
variable is deprecated and will be removed in May 2026. If you are
affected by this, we recommend disabling TRAP caching by passing the
<code>trap-caching: false</code> input to the <code>init</code> Action.
<a
href="https://redirect.github.com/github/codeql-action/pull/3795">#3795</a></li>
<li>The Git version 2.36.0 requirement for improved incremental analysis
now only applies to repositories that contain submodules. <a
href="https://redirect.github.com/github/codeql-action/pull/3789">#3789</a></li>
<li>Python analysis on GHES no longer extracts the standard library,
relying instead on models of the standard library. This should result in
significantly faster extraction and analysis times, while the effect on
alerts should be minimal. <a
href="https://redirect.github.com/github/codeql-action/pull/3794">#3794</a></li>
<li>Fixed a bug in the validation of OIDC configurations for private
registries that was added in CodeQL Action 4.33.0 / 3.33.0. <a
href="https://redirect.github.com/github/codeql-action/pull/3807">#3807</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.2">2.25.2</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3823">#3823</a></li>
</ul>
<h2>4.35.1 - 27 Mar 2026</h2>
<ul>
<li>Fix incorrect minimum required Git version for <a
href="https://redirect.github.com/github/roadmap/issues/1158">improved
incremental analysis</a>: it should have been 2.36.0, not 2.11.0. <a
href="https://redirect.github.com/github/codeql-action/pull/3781">#3781</a></li>
</ul>
<h2>4.35.0 - 27 Mar 2026</h2>
<ul>
<li>Reduced the minimum Git version required for <a
href="https://redirect.github.com/github/roadmap/issues/1158">improved
incremental analysis</a> from 2.38.0 to 2.11.0. <a
href="https://redirect.github.com/github/codeql-action/pull/3767">#3767</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.1">2.25.1</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3773">#3773</a></li>
</ul>
<h2>4.34.1 - 20 Mar 2026</h2>
<ul>
<li>Downgrade default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.24.3">2.24.3</a>
due to issues with a small percentage of Actions and JavaScript
analyses. <a
href="https://redirect.github.com/github/codeql-action/pull/3762">#3762</a></li>
</ul>
<h2>4.34.0 - 20 Mar 2026</h2>
<ul>
<li>Added an experimental change which disables TRAP caching when <a
href="https://redirect.github.com/github/roadmap/issues/1158">improved
incremental analysis</a> is enabled, since improved incremental analysis
supersedes TRAP caching. This will improve performance and reduce
Actions cache usage. We expect to roll this change out to everyone in
March. <a
href="https://redirect.github.com/github/codeql-action/pull/3569">#3569</a></li>
<li>We are rolling out improved incremental analysis to C/C++ analyses
that use build mode <code>none</code>. We expect this rollout to be
complete by the end of April 2026. <a
href="https://redirect.github.com/github/codeql-action/pull/3584">#3584</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.0">2.25.0</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3585">#3585</a></li>
</ul>
<h2>4.33.0 - 16 Mar 2026</h2>
<ul>
<li>
<p>Upcoming change: Starting April 2026, the CodeQL Action will skip
collecting file coverage information on pull requests to improve
analysis performance. File coverage information will still be computed
on non-PR analyses. Pull request analyses will log a warning about this
upcoming change. <a
href="https://redirect.github.com/github/codeql-action/pull/3562">#3562</a></p>
<p>To opt out of this change:</p>
<ul>
<li><strong>Repositories owned by an organization:</strong> Create a
custom repository property with the name
<code>github-codeql-file-coverage-on-prs</code> and the type
&quot;True/false&quot;, then set this property to <code>true</code> in
the repository's settings. For more information, see <a
href="https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization">Managing
custom properties for repositories in your organization</a>.
Alternatively, if you are using an advanced setup workflow, you can set
the <code>CODEQL_ACTION_FILE_COVERAGE_ON_PRS</code> environment variable
to <code>true</code> in your workflow.</li>
<li><strong>User-owned repositories using default setup:</strong> Switch
to an advanced setup workflow and set the
<code>CODEQL_ACTION_FILE_COVERAGE_ON_PRS</code> environment variable to
<code>true</code> in your workflow.</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e46ed2cbd0"><code>e46ed2c</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3867">#3867</a>
from github/update-v4.35.3-8c6e48dbe</li>
<li><a
href="b73d1d1634"><code>b73d1d1</code></a>
Add changelog entry for <a
href="https://redirect.github.com/github/codeql-action/issues/3853">#3853</a></li>
<li><a
href="24e0bb00a9"><code>24e0bb0</code></a>
Reorder changelog entries</li>
<li><a
href="ec298daba7"><code>ec298da</code></a>
Update changelog for v4.35.3</li>
<li><a
href="8c6e48dbe0"><code>8c6e48d</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3865">#3865</a>
from github/update-bundle/codeql-bundle-v2.25.3</li>
<li><a
href="719098349e"><code>7190983</code></a>
Add changelog note</li>
<li><a
href="2bb209555a"><code>2bb2095</code></a>
Update default bundle to codeql-bundle-v2.25.3</li>
<li><a
href="7851e55dc3"><code>7851e55</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3850">#3850</a>
from github/mbg/private-registry/cloudsmith-gcp</li>
<li><a
href="262a15f6cf"><code>262a15f</code></a>
Add generic non-printable chars test for OIDC configs</li>
<li><a
href="a6109b1c07"><code>a6109b1</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3853">#3853</a>
from github/mbg/start-proxy/improved-checks</li>
<li>Additional commits viewable in <a
href="45cbd0c69e...e46ed2cbd0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=4.32.2&new-version=4.35.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-09 03:58:07 +02:00
github-actions[bot]
9d91aa17e1 chore: update known checksums for 0.11.11 (#873)
chore: update known checksums for 0.11.11

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-07 09:14:04 +02:00
7 changed files with 267 additions and 10 deletions

View File

@@ -47,7 +47,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
with:
languages: ${{ matrix.language }}
source-root: src
@@ -59,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
uses: github/codeql-action/autobuild@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -73,4 +73,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3

View File

@@ -19,7 +19,7 @@ jobs:
pull-requests: read
steps:
- name: 🚀 Run Release Drafter
uses: release-drafter/release-drafter@563bf132657a13ded0b01fcb723c5a58cdd824e2 # v7.2.1
uses: release-drafter/release-drafter@5de93583980a40bd78603b6dfdcda5b4df377b32 # v7.2.0
with:
commitish: ${{ github.sha }}
env:

View File

@@ -223,7 +223,7 @@ describe("download-version", () => {
);
});
it("does not rewrite non-GitHub URLs", async () => {
it("does not send the token to non-GitHub URLs from the default manifest", async () => {
mockGetArtifact.mockResolvedValue({
archiveFormat: "tar.gz",
checksum: "abc123",
@@ -241,8 +241,30 @@ describe("download-version", () => {
expect(mockDownloadTool).toHaveBeenCalledWith(
"https://example.com/uv.tar.gz",
undefined,
undefined,
);
});
it("does not send the token to GitHub lookalike hosts", async () => {
mockGetArtifact.mockResolvedValue({
archiveFormat: "tar.gz",
checksum: "abc123",
downloadUrl: "https://github.com.evil.test/uv.tar.gz",
});
await downloadVersion(
"unknown-linux-gnu",
"x86_64",
"0.9.26",
undefined,
"token",
);
expect(mockDownloadTool).toHaveBeenCalledWith(
"https://github.com.evil.test/uv.tar.gz",
undefined,
undefined,
);
});
it("falls back to GitHub Releases when the mirror fails", async () => {

65
dist/setup/index.cjs generated vendored
View File

@@ -90977,6 +90977,60 @@ var fs10 = __toESM(require("node:fs"), 1);
// src/download/checksum/known-checksums.ts
var KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.11.13": "196a58aa24da89144187670df7c407358028984537fbc2f8f2d8f7a2604980df",
"aarch64-pc-windows-msvc-0.11.13": "07c3c997020430a9f287fc05ff4c63fd5744eec49df5392a34731ed1a0971f2e",
"aarch64-unknown-linux-gnu-0.11.13": "12366407dc1fdba5179b10bd69c11ebfc2eff25791366089c0b2f5701056efc5",
"aarch64-unknown-linux-musl-0.11.13": "bea8a97b1b3ed41491e075c1f474e7f0249582aa3f62849c4e874b5f34ddc95e",
"arm-unknown-linux-musleabihf-0.11.13": "ee282adf170eb845821309ca6038fdd87a93dd25326f96efe6ea58a1b66a9064",
"armv7-unknown-linux-gnueabihf-0.11.13": "4761e38e3d5ca62e87ef13bc35ba169e6ebd126472482095405367b31be88945",
"armv7-unknown-linux-musleabihf-0.11.13": "d54342a96dda65339b4f7b9e6bb7a27b81aeeffca14e5dfa7911d00fe4a3ead9",
"i686-pc-windows-msvc-0.11.13": "a9b2d96a118a401c7dc5b717752a074b6324ddc9b36dcb2b60466a4e2912a3ba",
"i686-unknown-linux-gnu-0.11.13": "630774d3fd255a219a6eef58f004201737c60f4b282777fb99e599cd90567fe4",
"i686-unknown-linux-musl-0.11.13": "52cb28c81ca43ea5184f944c31555981cb29c03c2497fa848541af5ee4d8448f",
"powerpc64le-unknown-linux-gnu-0.11.13": "7f302104ea18a01381fe58434b593f887c4f10bc523ad50781de408fbec54354",
"riscv64gc-unknown-linux-gnu-0.11.13": "3264ce97b34d5c8d37c1e67821a74960ca89237e001253309a3cda25fb416040",
"riscv64gc-unknown-linux-musl-0.11.13": "44f23b8e59fd8628fb68383e4cbdf78c3cff02ed86d3dcea5605ebd7757ca363",
"s390x-unknown-linux-gnu-0.11.13": "e0e5e0a652650900d97f6a660bae526601033d9d071ca5dd9ca735442161ebed",
"x86_64-apple-darwin-0.11.13": "99aad3f4956f5b92efd83eca6d87bf03e10688899487ad541f904c9c25c61dc1",
"x86_64-pc-windows-msvc-0.11.13": "0953ac2ef4fbe47ad469bfa80b658a577a02c4d73a2fb9c4c7c70dda432efded",
"x86_64-unknown-linux-gnu-0.11.13": "f830ea3d38ae1492acf53cb7f2cd0f81d6ae22b42d2d7310a6c7d42c451e1a43",
"x86_64-unknown-linux-musl-0.11.13": "5635afc285df86ce6f05f3f22335f9548b0026e58531904482c9670a1c1c65d9",
"aarch64-apple-darwin-0.11.12": "bb7c6ef869ec00cd1452f4884acf23d00b153c356ba9197ae99a1bc1ceadb7f3",
"aarch64-pc-windows-msvc-0.11.12": "393de1abc2f663cb9dd24405c7a7b31119e2a734609a233d9b89415821f39bf9",
"aarch64-unknown-linux-gnu-0.11.12": "d6e3e5183e71bbd40400da3d2913743cefb98835d8312a5e7908c33865597515",
"aarch64-unknown-linux-musl-0.11.12": "b70e87f15f12d750d218042c4ed36e41de0757eab249d332ee2e242e4174b5d5",
"arm-unknown-linux-musleabihf-0.11.12": "c1991e652c345395eff3e43aaa0f2ce5d7f0c7ed0dd5a72dcb0a3c109289ac11",
"armv7-unknown-linux-gnueabihf-0.11.12": "432e6a96ecc976861dc884d96ac3aa3cc305abc3bb49d3204544477d4a290c64",
"armv7-unknown-linux-musleabihf-0.11.12": "a8855302bad162af78c8fa53f402128a3496b7806dc7201252e7f123eefed8b9",
"i686-pc-windows-msvc-0.11.12": "98efe2a4cb9529724639aac488c43b28753e738b0f4c679d3e2dea150e5a9b20",
"i686-unknown-linux-gnu-0.11.12": "22dbbbcd9088ad3ddefce9be142ce2b127b3950718222413e3890f7fbf4a567d",
"i686-unknown-linux-musl-0.11.12": "fc5ff3fef5facf01a664f0942f372988804bda1bb8c7f9e9642d9d29398cf129",
"powerpc64le-unknown-linux-gnu-0.11.12": "36619f91357b240648caed6557fe893922c7986319c070f4feb225e8f3180b49",
"riscv64gc-unknown-linux-gnu-0.11.12": "9bdcac006731a2094ad002d93c4fe84a259484e4d35566e29fcb76962961cef9",
"riscv64gc-unknown-linux-musl-0.11.12": "80012ba0aa3b21561c96edda003add87d9111daf3425e5cc3243957ca76ba396",
"s390x-unknown-linux-gnu-0.11.12": "c9ae09f73066fb9c48beaec2ab4ad2407ce94354c5224e2982196577d6bf4581",
"x86_64-apple-darwin-0.11.12": "32fb217e6181384bf6534b31adcc66cd552eff98643c4bb35832be8552486912",
"x86_64-pc-windows-msvc-0.11.12": "e46956a6b088a0382101c797eef945c1b03826e629e968d434cf838d42d85b6b",
"x86_64-unknown-linux-gnu-0.11.12": "9acdecddacba550ee616c02bb4616d894352022550c5977524556fd5077ce1d4",
"x86_64-unknown-linux-musl-0.11.12": "591a7557f5ba7e51565f338dd4c50cebc12820ec2ebb8403a4304685f8d53ab9",
"aarch64-apple-darwin-0.11.11": "3a185bf8f46a7b7c8b910d111825907b1638d0ae503cb3c333ae205772354046",
"aarch64-pc-windows-msvc-0.11.11": "3d8f05de7ed9de885299565f78832a13e443be51de86260f25edb7cfd0fa05f6",
"aarch64-unknown-linux-gnu-0.11.11": "155fe4d3b3cb4bfce118ab4b1380f71515ae874d13d9858171b4f9c26e16684d",
"aarch64-unknown-linux-musl-0.11.11": "0fc9a49b3900f77ffaccf3ff69a70ddbc1d479e70ac5d8fd6416a7577b03c5a1",
"arm-unknown-linux-musleabihf-0.11.11": "ef98cbcd50a62d063958740194497a44fc1dc07867b6fe001db1ab2e621f1f2e",
"armv7-unknown-linux-gnueabihf-0.11.11": "c102609d34c06bdec87896d738a0e91df21f71faf21ae4379c7a1d7c961879e1",
"armv7-unknown-linux-musleabihf-0.11.11": "6660651927263c587769697572f4843ac6ea91b2b2d24be1b9c8465e87d05b46",
"i686-pc-windows-msvc-0.11.11": "c230fccbe5737e1a54a2f77ff3116c88fbee21c9b437323907618931b767410e",
"i686-unknown-linux-gnu-0.11.11": "4be5e9901e87f90a9eb5ee11a08a8df2f637df76f3a2dcb11778991b7db9d9a2",
"i686-unknown-linux-musl-0.11.11": "d2ded13fbaf59f5f1d3363c47a7cafb73cb7454db1e16cea13365bc28c75522d",
"powerpc64le-unknown-linux-gnu-0.11.11": "5348415c8606e5efac5cb293d83d2ae71e43a2dcabf677c6a4cac965c1982c74",
"riscv64gc-unknown-linux-gnu-0.11.11": "0eadf068918b960e7bf62eda83613c08d99f0d002b8d475d3383993191554d04",
"riscv64gc-unknown-linux-musl-0.11.11": "0ee27ce77e32496bc46e01f1cbb730d13647cbca41934a5871bf2fe5fdc5ba39",
"s390x-unknown-linux-gnu-0.11.11": "f19c950a93b1f5af4108267743f3de61346250b35c60cc552fb4187b534af770",
"x86_64-apple-darwin-0.11.11": "57a1a8085b4088fbcbd5080c0c30723ba6d0692c89cd071c08a4209e8da602d1",
"x86_64-pc-windows-msvc-0.11.11": "2f75a0db2c3530b6b3c24434dc38137f61ff1f4e5f2d7b4ddc5bcd142cf58b65",
"x86_64-unknown-linux-gnu-0.11.11": "a767848254391855c96df271e9ca8b7f72dd172d310460447853d25d907b9ae0",
"x86_64-unknown-linux-musl-0.11.11": "80521f18ba83109acd17e0730bd8ff898c3426aa62252c627d63418b353e788a",
"aarch64-apple-darwin-0.11.10": "e93d6af7dfff7071edd16342ba9eeccfc28d8a7deaa5707efeecf63a63a74453",
"aarch64-pc-windows-msvc-0.11.10": "3d5878cfc55106083ada1e41cccdde477413701eb9d34767e8ad973bb0863de6",
"aarch64-unknown-linux-gnu-0.11.10": "91d5f4583539640765662ef86edcf3bf4db07439b622c7bed50c961240162046",
@@ -96935,7 +96989,7 @@ async function downloadVersion(platform2, arch3, version3, checksum, githubToken
const resolvedChecksum = manifestUrl === void 0 ? checksum : resolveChecksum(checksum, artifact.checksum);
const mirrorUrl = rewriteToMirror(artifact.downloadUrl);
const downloadUrl = mirrorUrl ?? artifact.downloadUrl;
const downloadToken = mirrorUrl !== void 0 ? void 0 : githubToken;
const downloadToken = githubTokenForUrl(downloadUrl, githubToken);
try {
return await downloadArtifact(
downloadUrl,
@@ -96960,7 +97014,7 @@ async function downloadVersion(platform2, arch3, version3, checksum, githubToken
arch3,
version3,
resolvedChecksum,
githubToken
githubTokenForUrl(artifact.downloadUrl, githubToken)
);
}
}
@@ -96970,6 +97024,13 @@ function rewriteToMirror(url2) {
}
return ASTRAL_MIRROR_PREFIX + url2.slice(GITHUB_RELEASES_PREFIX.length);
}
function githubTokenForUrl(downloadUrl, githubToken) {
try {
return new URL(downloadUrl).origin === "https://github.com" ? githubToken : void 0;
} catch {
return void 0;
}
}
async function downloadArtifact(downloadUrl, artifactName, platform2, arch3, version3, checksum, githubToken) {
info(`Downloading uv from "${downloadUrl}" ...`);
const downloadPath = await downloadTool(

View File

@@ -44949,6 +44949,60 @@ var semver = __toESM(require_semver(), 1);
// src/download/checksum/known-checksums.ts
var KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.11.13": "196a58aa24da89144187670df7c407358028984537fbc2f8f2d8f7a2604980df",
"aarch64-pc-windows-msvc-0.11.13": "07c3c997020430a9f287fc05ff4c63fd5744eec49df5392a34731ed1a0971f2e",
"aarch64-unknown-linux-gnu-0.11.13": "12366407dc1fdba5179b10bd69c11ebfc2eff25791366089c0b2f5701056efc5",
"aarch64-unknown-linux-musl-0.11.13": "bea8a97b1b3ed41491e075c1f474e7f0249582aa3f62849c4e874b5f34ddc95e",
"arm-unknown-linux-musleabihf-0.11.13": "ee282adf170eb845821309ca6038fdd87a93dd25326f96efe6ea58a1b66a9064",
"armv7-unknown-linux-gnueabihf-0.11.13": "4761e38e3d5ca62e87ef13bc35ba169e6ebd126472482095405367b31be88945",
"armv7-unknown-linux-musleabihf-0.11.13": "d54342a96dda65339b4f7b9e6bb7a27b81aeeffca14e5dfa7911d00fe4a3ead9",
"i686-pc-windows-msvc-0.11.13": "a9b2d96a118a401c7dc5b717752a074b6324ddc9b36dcb2b60466a4e2912a3ba",
"i686-unknown-linux-gnu-0.11.13": "630774d3fd255a219a6eef58f004201737c60f4b282777fb99e599cd90567fe4",
"i686-unknown-linux-musl-0.11.13": "52cb28c81ca43ea5184f944c31555981cb29c03c2497fa848541af5ee4d8448f",
"powerpc64le-unknown-linux-gnu-0.11.13": "7f302104ea18a01381fe58434b593f887c4f10bc523ad50781de408fbec54354",
"riscv64gc-unknown-linux-gnu-0.11.13": "3264ce97b34d5c8d37c1e67821a74960ca89237e001253309a3cda25fb416040",
"riscv64gc-unknown-linux-musl-0.11.13": "44f23b8e59fd8628fb68383e4cbdf78c3cff02ed86d3dcea5605ebd7757ca363",
"s390x-unknown-linux-gnu-0.11.13": "e0e5e0a652650900d97f6a660bae526601033d9d071ca5dd9ca735442161ebed",
"x86_64-apple-darwin-0.11.13": "99aad3f4956f5b92efd83eca6d87bf03e10688899487ad541f904c9c25c61dc1",
"x86_64-pc-windows-msvc-0.11.13": "0953ac2ef4fbe47ad469bfa80b658a577a02c4d73a2fb9c4c7c70dda432efded",
"x86_64-unknown-linux-gnu-0.11.13": "f830ea3d38ae1492acf53cb7f2cd0f81d6ae22b42d2d7310a6c7d42c451e1a43",
"x86_64-unknown-linux-musl-0.11.13": "5635afc285df86ce6f05f3f22335f9548b0026e58531904482c9670a1c1c65d9",
"aarch64-apple-darwin-0.11.12": "bb7c6ef869ec00cd1452f4884acf23d00b153c356ba9197ae99a1bc1ceadb7f3",
"aarch64-pc-windows-msvc-0.11.12": "393de1abc2f663cb9dd24405c7a7b31119e2a734609a233d9b89415821f39bf9",
"aarch64-unknown-linux-gnu-0.11.12": "d6e3e5183e71bbd40400da3d2913743cefb98835d8312a5e7908c33865597515",
"aarch64-unknown-linux-musl-0.11.12": "b70e87f15f12d750d218042c4ed36e41de0757eab249d332ee2e242e4174b5d5",
"arm-unknown-linux-musleabihf-0.11.12": "c1991e652c345395eff3e43aaa0f2ce5d7f0c7ed0dd5a72dcb0a3c109289ac11",
"armv7-unknown-linux-gnueabihf-0.11.12": "432e6a96ecc976861dc884d96ac3aa3cc305abc3bb49d3204544477d4a290c64",
"armv7-unknown-linux-musleabihf-0.11.12": "a8855302bad162af78c8fa53f402128a3496b7806dc7201252e7f123eefed8b9",
"i686-pc-windows-msvc-0.11.12": "98efe2a4cb9529724639aac488c43b28753e738b0f4c679d3e2dea150e5a9b20",
"i686-unknown-linux-gnu-0.11.12": "22dbbbcd9088ad3ddefce9be142ce2b127b3950718222413e3890f7fbf4a567d",
"i686-unknown-linux-musl-0.11.12": "fc5ff3fef5facf01a664f0942f372988804bda1bb8c7f9e9642d9d29398cf129",
"powerpc64le-unknown-linux-gnu-0.11.12": "36619f91357b240648caed6557fe893922c7986319c070f4feb225e8f3180b49",
"riscv64gc-unknown-linux-gnu-0.11.12": "9bdcac006731a2094ad002d93c4fe84a259484e4d35566e29fcb76962961cef9",
"riscv64gc-unknown-linux-musl-0.11.12": "80012ba0aa3b21561c96edda003add87d9111daf3425e5cc3243957ca76ba396",
"s390x-unknown-linux-gnu-0.11.12": "c9ae09f73066fb9c48beaec2ab4ad2407ce94354c5224e2982196577d6bf4581",
"x86_64-apple-darwin-0.11.12": "32fb217e6181384bf6534b31adcc66cd552eff98643c4bb35832be8552486912",
"x86_64-pc-windows-msvc-0.11.12": "e46956a6b088a0382101c797eef945c1b03826e629e968d434cf838d42d85b6b",
"x86_64-unknown-linux-gnu-0.11.12": "9acdecddacba550ee616c02bb4616d894352022550c5977524556fd5077ce1d4",
"x86_64-unknown-linux-musl-0.11.12": "591a7557f5ba7e51565f338dd4c50cebc12820ec2ebb8403a4304685f8d53ab9",
"aarch64-apple-darwin-0.11.11": "3a185bf8f46a7b7c8b910d111825907b1638d0ae503cb3c333ae205772354046",
"aarch64-pc-windows-msvc-0.11.11": "3d8f05de7ed9de885299565f78832a13e443be51de86260f25edb7cfd0fa05f6",
"aarch64-unknown-linux-gnu-0.11.11": "155fe4d3b3cb4bfce118ab4b1380f71515ae874d13d9858171b4f9c26e16684d",
"aarch64-unknown-linux-musl-0.11.11": "0fc9a49b3900f77ffaccf3ff69a70ddbc1d479e70ac5d8fd6416a7577b03c5a1",
"arm-unknown-linux-musleabihf-0.11.11": "ef98cbcd50a62d063958740194497a44fc1dc07867b6fe001db1ab2e621f1f2e",
"armv7-unknown-linux-gnueabihf-0.11.11": "c102609d34c06bdec87896d738a0e91df21f71faf21ae4379c7a1d7c961879e1",
"armv7-unknown-linux-musleabihf-0.11.11": "6660651927263c587769697572f4843ac6ea91b2b2d24be1b9c8465e87d05b46",
"i686-pc-windows-msvc-0.11.11": "c230fccbe5737e1a54a2f77ff3116c88fbee21c9b437323907618931b767410e",
"i686-unknown-linux-gnu-0.11.11": "4be5e9901e87f90a9eb5ee11a08a8df2f637df76f3a2dcb11778991b7db9d9a2",
"i686-unknown-linux-musl-0.11.11": "d2ded13fbaf59f5f1d3363c47a7cafb73cb7454db1e16cea13365bc28c75522d",
"powerpc64le-unknown-linux-gnu-0.11.11": "5348415c8606e5efac5cb293d83d2ae71e43a2dcabf677c6a4cac965c1982c74",
"riscv64gc-unknown-linux-gnu-0.11.11": "0eadf068918b960e7bf62eda83613c08d99f0d002b8d475d3383993191554d04",
"riscv64gc-unknown-linux-musl-0.11.11": "0ee27ce77e32496bc46e01f1cbb730d13647cbca41934a5871bf2fe5fdc5ba39",
"s390x-unknown-linux-gnu-0.11.11": "f19c950a93b1f5af4108267743f3de61346250b35c60cc552fb4187b534af770",
"x86_64-apple-darwin-0.11.11": "57a1a8085b4088fbcbd5080c0c30723ba6d0692c89cd071c08a4209e8da602d1",
"x86_64-pc-windows-msvc-0.11.11": "2f75a0db2c3530b6b3c24434dc38137f61ff1f4e5f2d7b4ddc5bcd142cf58b65",
"x86_64-unknown-linux-gnu-0.11.11": "a767848254391855c96df271e9ca8b7f72dd172d310460447853d25d907b9ae0",
"x86_64-unknown-linux-musl-0.11.11": "80521f18ba83109acd17e0730bd8ff898c3426aa62252c627d63418b353e788a",
"aarch64-apple-darwin-0.11.10": "e93d6af7dfff7071edd16342ba9eeccfc28d8a7deaa5707efeecf63a63a74453",
"aarch64-pc-windows-msvc-0.11.10": "3d5878cfc55106083ada1e41cccdde477413701eb9d34767e8ad973bb0863de6",
"aarch64-unknown-linux-gnu-0.11.10": "91d5f4583539640765662ef86edcf3bf4db07439b622c7bed50c961240162046",

View File

@@ -1,5 +1,113 @@
// AUTOGENERATED_DO_NOT_EDIT
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
"aarch64-apple-darwin-0.11.13":
"196a58aa24da89144187670df7c407358028984537fbc2f8f2d8f7a2604980df",
"aarch64-pc-windows-msvc-0.11.13":
"07c3c997020430a9f287fc05ff4c63fd5744eec49df5392a34731ed1a0971f2e",
"aarch64-unknown-linux-gnu-0.11.13":
"12366407dc1fdba5179b10bd69c11ebfc2eff25791366089c0b2f5701056efc5",
"aarch64-unknown-linux-musl-0.11.13":
"bea8a97b1b3ed41491e075c1f474e7f0249582aa3f62849c4e874b5f34ddc95e",
"arm-unknown-linux-musleabihf-0.11.13":
"ee282adf170eb845821309ca6038fdd87a93dd25326f96efe6ea58a1b66a9064",
"armv7-unknown-linux-gnueabihf-0.11.13":
"4761e38e3d5ca62e87ef13bc35ba169e6ebd126472482095405367b31be88945",
"armv7-unknown-linux-musleabihf-0.11.13":
"d54342a96dda65339b4f7b9e6bb7a27b81aeeffca14e5dfa7911d00fe4a3ead9",
"i686-pc-windows-msvc-0.11.13":
"a9b2d96a118a401c7dc5b717752a074b6324ddc9b36dcb2b60466a4e2912a3ba",
"i686-unknown-linux-gnu-0.11.13":
"630774d3fd255a219a6eef58f004201737c60f4b282777fb99e599cd90567fe4",
"i686-unknown-linux-musl-0.11.13":
"52cb28c81ca43ea5184f944c31555981cb29c03c2497fa848541af5ee4d8448f",
"powerpc64le-unknown-linux-gnu-0.11.13":
"7f302104ea18a01381fe58434b593f887c4f10bc523ad50781de408fbec54354",
"riscv64gc-unknown-linux-gnu-0.11.13":
"3264ce97b34d5c8d37c1e67821a74960ca89237e001253309a3cda25fb416040",
"riscv64gc-unknown-linux-musl-0.11.13":
"44f23b8e59fd8628fb68383e4cbdf78c3cff02ed86d3dcea5605ebd7757ca363",
"s390x-unknown-linux-gnu-0.11.13":
"e0e5e0a652650900d97f6a660bae526601033d9d071ca5dd9ca735442161ebed",
"x86_64-apple-darwin-0.11.13":
"99aad3f4956f5b92efd83eca6d87bf03e10688899487ad541f904c9c25c61dc1",
"x86_64-pc-windows-msvc-0.11.13":
"0953ac2ef4fbe47ad469bfa80b658a577a02c4d73a2fb9c4c7c70dda432efded",
"x86_64-unknown-linux-gnu-0.11.13":
"f830ea3d38ae1492acf53cb7f2cd0f81d6ae22b42d2d7310a6c7d42c451e1a43",
"x86_64-unknown-linux-musl-0.11.13":
"5635afc285df86ce6f05f3f22335f9548b0026e58531904482c9670a1c1c65d9",
"aarch64-apple-darwin-0.11.12":
"bb7c6ef869ec00cd1452f4884acf23d00b153c356ba9197ae99a1bc1ceadb7f3",
"aarch64-pc-windows-msvc-0.11.12":
"393de1abc2f663cb9dd24405c7a7b31119e2a734609a233d9b89415821f39bf9",
"aarch64-unknown-linux-gnu-0.11.12":
"d6e3e5183e71bbd40400da3d2913743cefb98835d8312a5e7908c33865597515",
"aarch64-unknown-linux-musl-0.11.12":
"b70e87f15f12d750d218042c4ed36e41de0757eab249d332ee2e242e4174b5d5",
"arm-unknown-linux-musleabihf-0.11.12":
"c1991e652c345395eff3e43aaa0f2ce5d7f0c7ed0dd5a72dcb0a3c109289ac11",
"armv7-unknown-linux-gnueabihf-0.11.12":
"432e6a96ecc976861dc884d96ac3aa3cc305abc3bb49d3204544477d4a290c64",
"armv7-unknown-linux-musleabihf-0.11.12":
"a8855302bad162af78c8fa53f402128a3496b7806dc7201252e7f123eefed8b9",
"i686-pc-windows-msvc-0.11.12":
"98efe2a4cb9529724639aac488c43b28753e738b0f4c679d3e2dea150e5a9b20",
"i686-unknown-linux-gnu-0.11.12":
"22dbbbcd9088ad3ddefce9be142ce2b127b3950718222413e3890f7fbf4a567d",
"i686-unknown-linux-musl-0.11.12":
"fc5ff3fef5facf01a664f0942f372988804bda1bb8c7f9e9642d9d29398cf129",
"powerpc64le-unknown-linux-gnu-0.11.12":
"36619f91357b240648caed6557fe893922c7986319c070f4feb225e8f3180b49",
"riscv64gc-unknown-linux-gnu-0.11.12":
"9bdcac006731a2094ad002d93c4fe84a259484e4d35566e29fcb76962961cef9",
"riscv64gc-unknown-linux-musl-0.11.12":
"80012ba0aa3b21561c96edda003add87d9111daf3425e5cc3243957ca76ba396",
"s390x-unknown-linux-gnu-0.11.12":
"c9ae09f73066fb9c48beaec2ab4ad2407ce94354c5224e2982196577d6bf4581",
"x86_64-apple-darwin-0.11.12":
"32fb217e6181384bf6534b31adcc66cd552eff98643c4bb35832be8552486912",
"x86_64-pc-windows-msvc-0.11.12":
"e46956a6b088a0382101c797eef945c1b03826e629e968d434cf838d42d85b6b",
"x86_64-unknown-linux-gnu-0.11.12":
"9acdecddacba550ee616c02bb4616d894352022550c5977524556fd5077ce1d4",
"x86_64-unknown-linux-musl-0.11.12":
"591a7557f5ba7e51565f338dd4c50cebc12820ec2ebb8403a4304685f8d53ab9",
"aarch64-apple-darwin-0.11.11":
"3a185bf8f46a7b7c8b910d111825907b1638d0ae503cb3c333ae205772354046",
"aarch64-pc-windows-msvc-0.11.11":
"3d8f05de7ed9de885299565f78832a13e443be51de86260f25edb7cfd0fa05f6",
"aarch64-unknown-linux-gnu-0.11.11":
"155fe4d3b3cb4bfce118ab4b1380f71515ae874d13d9858171b4f9c26e16684d",
"aarch64-unknown-linux-musl-0.11.11":
"0fc9a49b3900f77ffaccf3ff69a70ddbc1d479e70ac5d8fd6416a7577b03c5a1",
"arm-unknown-linux-musleabihf-0.11.11":
"ef98cbcd50a62d063958740194497a44fc1dc07867b6fe001db1ab2e621f1f2e",
"armv7-unknown-linux-gnueabihf-0.11.11":
"c102609d34c06bdec87896d738a0e91df21f71faf21ae4379c7a1d7c961879e1",
"armv7-unknown-linux-musleabihf-0.11.11":
"6660651927263c587769697572f4843ac6ea91b2b2d24be1b9c8465e87d05b46",
"i686-pc-windows-msvc-0.11.11":
"c230fccbe5737e1a54a2f77ff3116c88fbee21c9b437323907618931b767410e",
"i686-unknown-linux-gnu-0.11.11":
"4be5e9901e87f90a9eb5ee11a08a8df2f637df76f3a2dcb11778991b7db9d9a2",
"i686-unknown-linux-musl-0.11.11":
"d2ded13fbaf59f5f1d3363c47a7cafb73cb7454db1e16cea13365bc28c75522d",
"powerpc64le-unknown-linux-gnu-0.11.11":
"5348415c8606e5efac5cb293d83d2ae71e43a2dcabf677c6a4cac965c1982c74",
"riscv64gc-unknown-linux-gnu-0.11.11":
"0eadf068918b960e7bf62eda83613c08d99f0d002b8d475d3383993191554d04",
"riscv64gc-unknown-linux-musl-0.11.11":
"0ee27ce77e32496bc46e01f1cbb730d13647cbca41934a5871bf2fe5fdc5ba39",
"s390x-unknown-linux-gnu-0.11.11":
"f19c950a93b1f5af4108267743f3de61346250b35c60cc552fb4187b534af770",
"x86_64-apple-darwin-0.11.11":
"57a1a8085b4088fbcbd5080c0c30723ba6d0692c89cd071c08a4209e8da602d1",
"x86_64-pc-windows-msvc-0.11.11":
"2f75a0db2c3530b6b3c24434dc38137f61ff1f4e5f2d7b4ddc5bcd142cf58b65",
"x86_64-unknown-linux-gnu-0.11.11":
"a767848254391855c96df271e9ca8b7f72dd172d310460447853d25d907b9ae0",
"x86_64-unknown-linux-musl-0.11.11":
"80521f18ba83109acd17e0730bd8ff898c3426aa62252c627d63418b353e788a",
"aarch64-apple-darwin-0.11.10":
"e93d6af7dfff7071edd16342ba9eeccfc28d8a7deaa5707efeecf63a63a74453",
"aarch64-pc-windows-msvc-0.11.10":

View File

@@ -54,8 +54,7 @@ export async function downloadVersion(
const mirrorUrl = rewriteToMirror(artifact.downloadUrl);
const downloadUrl = mirrorUrl ?? artifact.downloadUrl;
// Don't send the GitHub token to the Astral mirror.
const downloadToken = mirrorUrl !== undefined ? undefined : githubToken;
const downloadToken = githubTokenForUrl(downloadUrl, githubToken);
try {
return await downloadArtifact(
@@ -83,7 +82,7 @@ export async function downloadVersion(
arch,
version,
resolvedChecksum,
githubToken,
githubTokenForUrl(artifact.downloadUrl, githubToken),
);
}
}
@@ -100,6 +99,19 @@ export function rewriteToMirror(url: string): string | undefined {
return ASTRAL_MIRROR_PREFIX + url.slice(GITHUB_RELEASES_PREFIX.length);
}
function githubTokenForUrl(
downloadUrl: string,
githubToken: string,
): string | undefined {
try {
return new URL(downloadUrl).origin === "https://github.com"
? githubToken
: undefined;
} catch {
return undefined;
}
}
async function downloadArtifact(
downloadUrl: string,
artifactName: string,