diff --git a/Cargo.lock b/Cargo.lock index 8d8dc8a5f..714cf887e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -334,15 +334,6 @@ dependencies = [ "rustversion", ] -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -1592,12 +1583,6 @@ dependencies = [ "itertools 0.13.0", ] -[[package]] -name = "critical-section" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" - [[package]] name = "crossbeam-deque" version = "0.8.7" @@ -2536,15 +2521,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "hash32" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" -dependencies = [ - "byteorder", -] - [[package]] name = "hashbrown" version = "0.16.1" @@ -2613,20 +2589,6 @@ dependencies = [ "zune-jpeg", ] -[[package]] -name = "heapless" -version = "0.7.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" -dependencies = [ - "atomic-polyfill", - "hash32", - "rustc_version", - "serde", - "spin", - "stable_deref_trait", -] - [[package]] name = "heck" version = "0.5.0" @@ -4737,7 +4699,6 @@ dependencies = [ "cobs", "embedded-io 0.4.0", "embedded-io 0.6.1", - "heapless", "serde", ] @@ -6260,15 +6221,6 @@ dependencies = [ "strum_macros 0.27.2", ] -[[package]] -name = "spin" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" -dependencies = [ - "lock_api", -] - [[package]] name = "spki" version = "0.8.0" diff --git a/crates/bashkit-monty/Cargo.toml b/crates/bashkit-monty/Cargo.toml index acba700c7..c9db81bbc 100644 --- a/crates/bashkit-monty/Cargo.toml +++ b/crates/bashkit-monty/Cargo.toml @@ -63,7 +63,16 @@ monty-macros = { version = "=1.5.0" } num-bigint = { version = "0.4", features = ["serde"] } num-integer = { version = "0.1" } num-traits = { version = "0.2" } -postcard = { version = "1.1", features = ["alloc"] } +# bashkit fork: upstream leaves postcard's default features on, and +# `default = ["heapless-cas"]` is what pulls `heapless` 0.7 (and its +# `atomic-polyfill`) into the graph. Nine unsoundness advisories landed +# against heapless 0.7.17 on 2026-11-18 (RUSTSEC-2026-0574 through 0582) and +# postcard 1.1.3, its newest release, still requires `heapless ^0.7`, so no +# bump reaches the patched 0.9.4. Only `to_allocvec`, `from_bytes` and +# `to_slice` are used here, all of which need `alloc` alone. Drop the marker +# when upstream Monty turns postcard's default features off, or postcard +# ships a release built on heapless >= 0.9.4. +postcard = { version = "1.1", default-features = false, features = ["alloc"] } ruff_python_ast = { version = "0.0.14" } ruff_python_codegen = { version = "0.0.14" } ruff_python_parser = { version = "0.0.14" } diff --git a/crates/bashkit/Cargo.toml b/crates/bashkit/Cargo.toml index 31b456a7c..ad6ffacd0 100644 --- a/crates/bashkit/Cargo.toml +++ b/crates/bashkit/Cargo.toml @@ -82,7 +82,7 @@ oxc_parser = { version = "0.117.0", optional = true } oxc_ast = { version = "0.117.0", optional = true } oxc_allocator = { version = "0.117.0", optional = true } oxc_span = { version = "0.117.0", optional = true } -postcard = { version = "1.1.3", features = ["alloc"], optional = true } +postcard = { version = "1.1.3", default-features = false, features = ["alloc"], optional = true } num-bigint = { version = "0.4.6", default-features = false, optional = true } self_cell = { version = "1.2.0", optional = true } diff --git a/crates/bashkit/fuzz/Cargo.lock b/crates/bashkit/fuzz/Cargo.lock index 8520e84d2..79a00ba07 100644 --- a/crates/bashkit/fuzz/Cargo.lock +++ b/crates/bashkit/fuzz/Cargo.lock @@ -99,15 +99,6 @@ dependencies = [ "syn 3.0.3", ] -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - [[package]] name = "attribute-derive" version = "0.11.0" @@ -174,6 +165,7 @@ dependencies = [ "chrono", "chrono-tz", "clap", + "encoding_rs", "fancy-regex", "flate2", "foldhash", @@ -574,6 +566,12 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + [[package]] name = "cow-utils" version = "0.1.3" @@ -777,12 +775,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "critical-section" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" - [[package]] name = "crossbeam-deque" version = "0.8.8" @@ -936,6 +928,20 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" +[[package]] +name = "encoding_rs" +version = "0.8.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89253175e704ab869b04f9db224d38630e0211a53841a79181deae0889e169f5" +dependencies = [ + "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -1167,15 +1173,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "hash32" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" -dependencies = [ - "byteorder", -] - [[package]] name = "hashbrown" version = "0.16.1" @@ -1198,20 +1195,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "heapless" -version = "0.7.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" -dependencies = [ - "atomic-polyfill", - "hash32", - "rustc_version", - "serde", - "spin", - "stable_deref_trait", -] - [[package]] name = "heck" version = "0.5.0" @@ -1616,15 +1599,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - [[package]] name = "log" version = "0.4.33" @@ -1732,11 +1706,17 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + [[package]] name = "nix" -version = "0.31.3" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +checksum = "77730ed34f01f4990cb2ea67fec715ecebc6fab9a6396cf83c5529b13f581bdc" dependencies = [ "bitflags 2.13.1", "cfg-if", @@ -2190,7 +2170,6 @@ dependencies = [ "cobs", "embedded-io 0.4.0", "embedded-io 0.6.1", - "heapless", "serde", ] @@ -2612,15 +2591,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - [[package]] name = "rustix" version = "1.1.6" @@ -2820,6 +2790,12 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "siphasher" version = "1.0.3" @@ -2858,15 +2834,6 @@ dependencies = [ "strum_macros", ] -[[package]] -name = "spin" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" -dependencies = [ - "lock_api", -] - [[package]] name = "stable_deref_trait" version = "1.2.1" diff --git a/crates/bashkit/tests/integration/byte_stream_tests.rs b/crates/bashkit/tests/integration/byte_stream_tests.rs index 41e6414a1..45e277949 100644 --- a/crates/bashkit/tests/integration/byte_stream_tests.rs +++ b/crates/bashkit/tests/integration/byte_stream_tests.rs @@ -246,6 +246,7 @@ async fn iconv_code_pages_match_real_iconv() { } #[tokio::test] +#[cfg_attr(not(unix), ignore = "compares against host Unix bash/tools")] async fn byte_tools_match_real_bash_on_non_utf8_input() { // tee, split and cut pass bytes through; text tools would print U+FFFD. let setup = "cd \"$(mktemp -d)\" && printf 'K\\366ln,\\377\\376\\000z\\nb,K\\303\\266ln\\200\\r\\n' > in.bin && "; diff --git a/deny.toml b/deny.toml index ebf82eb9b..aef27952b 100644 --- a/deny.toml +++ b/deny.toml @@ -54,9 +54,6 @@ ignore = [ # pre-release versions. Matching resumes the moment `rsa` ships a stable # release, so dropping the entry now would silently un-accept TM-CRY-002. "RUSTSEC-2023-0071", - # atomic-polyfill: transitive via monty -> postcard -> heapless - # Unmaintained but no security vulnerability; upstream dep we can't control - "RUSTSEC-2023-0089", ] [bans] diff --git a/knowledge/operations/dependencies.md b/knowledge/operations/dependencies.md index 1a7d7dd7d..ea8689e57 100644 --- a/knowledge/operations/dependencies.md +++ b/knowledge/operations/dependencies.md @@ -154,9 +154,11 @@ What the 1.4.0 -> 1.5.0 re-sync (the first one) took, beyond that list: ### A fork dependency may be marked ahead of upstream -A dependency's *version* may diverge when the fork's `Cargo.toml` line carries -a `bashkit fork: ` marker, in the comment block directly above it or at -the end of the line. What a marker does **not** cover: +A dependency's *version* or its *feature selection* (including +`default-features`) may diverge when the fork's `Cargo.toml` line carries a +`bashkit fork: ` marker, in the comment block directly above it or at the +end of the line. The check compares the whole dependency spec, so either kind +of drift is markable. What a marker does **not** cover: - **Adding or dropping** a dependency. Re-sync cannot reconcile a crate upstream does not have. @@ -192,7 +194,15 @@ every such bump unmergeable: #2860 (fancy-regex 0.17 -> 0.20, getrandom 0.3 -> 0.4) is the shape, and it would have come back every week. Holding the fork at upstream's version instead put two majors of fancy-regex in the graph. -`getrandom` and `jiter` are marked today. Taking a shared bump therefore +`postcard` is marked for a different reason: not a shared-crate bump but a +security one. Upstream Monty leaves its default features on, and postcard's +`default = ["heapless-cas"]` exists only to pull in `heapless` 0.7, which +collected nine unsoundness advisories on 2026-11-18 while postcard's newest +release still required `heapless ^0.7`. Turning the default features off drops +the unsound code out of the build instead of suppressing its advisories, and +costs nothing here because only `alloc`-level postcard APIs are used. + +`getrandom`, `jiter` and `postcard` are marked today. Taking a shared bump therefore means moving the fork line too, marking it, and re-applying whatever source adaptation the new major needs. `fancy-regex` was marked until the 1.5.0 re-sync: upstream Monty moved to 0.20 itself, so the fork no longer leads it diff --git a/knowledge/security/threat-model.md b/knowledge/security/threat-model.md index b47f898f9..fa65368ca 100644 --- a/knowledge/security/threat-model.md +++ b/knowledge/security/threat-model.md @@ -1894,7 +1894,6 @@ checks. | Advisory | Crate | Why suppressed | Remove when | |----------|-------|----------------|-------------| | RUSTSEC-2023-0071 | `rsa` | Marvin timing sidechannel (TM-CRY-002). No patched version exists; reachable only via the opt-in `ssh` feature | `rsa` ships a constant-time release | -| RUSTSEC-2023-0089 | `atomic-polyfill` | Unmaintained, no known vulnerability; transitive via `monty` → `postcard` → `heapless` (pinned at 0.7, which still requires it) | Upstream drops the dependency | | GHSA-fc5q-39xc-vjpf | `picomatch` (npm) | ReDoS via a single repeated extglob branch (`+(*)`). The advisory covers `<= 4.0.7`, picomatch's whole release history, and lists no patched version. Build tooling only (`ava`, `@napi-rs/cli`, `vite`, `tinyglobby`, `astro`); every glob comes from repo config, not tenant input, and no published package resolves it | picomatch ships a release above 4.0.7 that patches it | A suppression that stops matching is not evidence that it can be dropped. @@ -1906,6 +1905,14 @@ matching resumes as soon as `rsa` ships a stable release. Before removing any entry above, verify the advisory's own patched release, dependency removal, or explicit upstream withdrawal rather than the scanner's silence. +Retired: RUSTSEC-2023-0089 (`atomic-polyfill`), whose removal condition was +upstream dropping the dependency. `postcard` gates `heapless` behind its +`heapless-cas` default feature, and `heapless` 0.7 is what pulled in +`atomic-polyfill`, so declaring `postcard` with `default-features = false` +drops both from the graph. The crate is now absent from every discovered +lockfile, which is dependency removal rather than scanner silence, so the +entry was deleted instead of kept. + Retired: [GHSA-vfj7-8cjw-p6xm](https://github.com/advisories/GHSA-vfj7-8cjw-p6xm) (`braces`, npm), withdrawn by GitHub on 2026-10-23 at 12:53:02 UTC because it was not a practically exploitable vulnerability. The AVA dev-only chain still