From 8ff92e98537708ea94a4da07b23b70776a03dda9 Mon Sep 17 00:00:00 2001 From: Luka Tsabadze Date: Tue, 24 Nov 2026 09:50:26 +0200 Subject: [PATCH] fix(ci): bump url past RUSTSEC-2026-0592 and deflake tmpdir reclaim test url 2.5.8 is flagged by RUSTSEC-2026-0592 (stack overflow in Url::origin() on nested blob: URLs), failing the dependency audit on every PR. Bump to 2.5.9, which needs form_urlencoded 1.2.3. claim_tmpdir_is_free_once_only_a_spawned_command_has_descriptors could fail when another test forked while the claim was held: the child keeps the flock'd open file description until its exec closes it. Retry the reclaim briefly; a descriptor the sleep really inherited still holds the lock past the deadline. Co-authored-by: Cursor --- Cargo.lock | 8 ++++---- crates/axis-sandbox/src/linux/landlock.rs | 13 +++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4f04907..f7ea3a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -745,9 +745,9 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "form_urlencoded" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" dependencies = [ "percent-encoding", ] @@ -2738,9 +2738,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.8" +version = "2.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" dependencies = [ "form_urlencoded", "idna", diff --git a/crates/axis-sandbox/src/linux/landlock.rs b/crates/axis-sandbox/src/linux/landlock.rs index 2990748..7f829c0 100644 --- a/crates/axis-sandbox/src/linux/landlock.rs +++ b/crates/axis-sandbox/src/linux/landlock.rs @@ -2023,8 +2023,17 @@ mod tests { .spawn() .unwrap(); drop(claim); - // Only an inherited lock descriptor could keep the workspace locked. - let reclaimed = claim_tmpdir(dir.path(), None); + // Only an inherited lock descriptor could keep the workspace locked + // past the deadline. A command another test forks while the claim is + // held keeps the lock only until its exec closes the descriptor. + let deadline = std::time::Instant::now() + std::time::Duration::from_secs(2); + let reclaimed = loop { + let reclaimed = claim_tmpdir(dir.path(), None); + if reclaimed.is_ok() || std::time::Instant::now() >= deadline { + break reclaimed; + } + std::thread::sleep(std::time::Duration::from_millis(10)); + }; let _ = command.kill(); let _ = command.wait(); assert!(reclaimed.is_ok(), "{identity}: {reclaimed:?}");