mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-12-05 02:25:59 +00:00
Warn when uv predates the eMudhra intermediate-key fix (#1172)
This implements the idea in #1171. TL;DR we now warn if the user explicitly requests an older uv version that doesn't reject the compromised eMudhra intermediates. <details> <summary>Automated notes</summary> - Warn when the selected uv version predates 0.13.5, which added rejection of certificate chains containing the compromised eMudhra intermediate keys. The warning appears in quiet mode and setup continues. [uv 0.13.5 release notes](https://github.com/astral-sh/uv/releases/tag/0.13.5#security) - Regenerate the published bundle and test versions on both sides of the cutoff. All 189 tests passed with `npm run all` on Node 24.22.1. Closes #1171 </details>
This commit is contained in:
1 parent
1b7eca8c42
commit
390b79e1c2
4 files changed
+114
-1
No files matched your search
+11
@@ -103322,6 +103322,7 @@ function emptyToUndefined(value) {
|
||||
}
|
||||
|
||||
// src/version/resolve.ts
|
||||
var EMUDHRA_FIXED_VERSION = "0.13.5";
|
||||
var ExactVersionResolver = class {
|
||||
async resolve(context3) {
|
||||
if (context3.parsedSpecifier.kind !== "exact") {
|
||||
@@ -103389,6 +103390,15 @@ async function resolveUvVersion(options, source) {
|
||||
);
|
||||
return version3;
|
||||
}
|
||||
function warnIfUvVersionPredatesEmudhraFix(version3) {
|
||||
if (semver5.satisfies(version3, `<${EMUDHRA_FIXED_VERSION}`, {
|
||||
includePrerelease: true
|
||||
})) {
|
||||
warning2(
|
||||
`uv ${version3} predates the fix that blocks the compromised eMudhra intermediate keys. Upgrade to uv ${EMUDHRA_FIXED_VERSION} or later.`
|
||||
);
|
||||
}
|
||||
}
|
||||
async function resolveVersion(versionInput, source, resolutionStrategy = "highest") {
|
||||
debug(`Resolving version: ${versionInput}`);
|
||||
if (versionInput.trim() === "latest-known") {
|
||||
@@ -103523,6 +103533,7 @@ async function run() {
|
||||
throw new Error(`Unsupported architecture: ${process.arch}`);
|
||||
}
|
||||
const setupResult = await setupUv(inputs, platform2, arch3);
|
||||
warnIfUvVersionPredatesEmudhraFix(setupResult.version);
|
||||
const uvPath = path17.join(
|
||||
setupResult.uvDir,
|
||||
process.platform === "win32" ? "uv.exe" : "uv"
|
||||
|
||||
Reference in new issue
Block a user