Repository navigation
fix(deps): clear the two RustSec advisories failing cargo-deny - #3264
Merged
Merged
Conversation
cargo-deny started failing on every branch after two advisories were published on 2026-11-22. RUSTSEC-2026-0592 is a stack overflow in `url` 2.5.8 `Url::origin()` on nested `blob:` URLs, reached through reqwest and tower-http; `url` moves to 2.5.9 (and `form_urlencoded` to 1.2.3), the fixed release. RUSTSEC-2026-0543 declares `chrono`, a direct dependency, unmaintained with no safe upgrade; it is an unmaintained notice rather than a vulnerability, so it is ignored in `deny.toml` with a reason until the call sites move to `time`. `cargo deny check advisories` passes locally.
3 tasks
Member
Author
|
The RUSTSEC-2026-0543 ignore added here is tracked for removal in #3266. |
5 of 6 tasks
inureyes
added a commit
that referenced
this pull request
Nov 27, 2026
* update(deps): replace the unmaintained chrono crate with time RUSTSEC-2026-0543 declares `chrono` unmaintained with no safe upgrade, and #3264 only recorded it as an ignore in `deny.toml`. Every direct use was a `chrono::Utc::now()` call under `src/server`: 45 sites in 23 files, in seven shapes. They now call `src/server/clock.rs`, which takes Unix values from `std::time` and calendar fields from `time::OffsetDateTime`, and spells out each string so it matches what chrono produced: - `timestamp()`, `timestamp_millis()`, `timestamp_micros()`: Unix seconds, milliseconds and microseconds, rounded toward the past. These feed `created`, `created_at`, `completed_at` and `started_at_unix`, the `srv_{pid}_{millis}` instance id, per-model `last_used`, and `req_{micros}` request ids. - `timestamp_nanos_opt().unwrap_or_default()`: Unix nanoseconds, or 0 outside the i64 range. Used in router-cache staging and quarantine directory names. - `to_rfc3339_opts(SecondsFormat::Secs, true)`: `2026-11-26T16:07:00Z`, for WebUI event `emitted_at` and lifecycle operation `created_at` and `updated_at`. - `to_rfc3339()`: a `+00:00` offset and a fraction of 0, 3, 6 or 9 digits, for runtime snapshot `sampled_at` and `measured_at`. - `format("%d %b %Y")`: `05 Mar 2026`, from the `strftime_now` chat-template function. `clock_tests.rs` pins each shape at fixed instants. The instants include one before the epoch, two outside the i64 nanosecond range, a leap day, a three-digit year, and fractions that need 1 to 9 digits. The same file passed against a copy of `clock.rs` built on main's chrono expressions and against the new code. The two test-only `DateTime::parse_from_rfc3339` checks now go through `clock::is_rfc3339`, which uses `time`'s RFC 3339 parser; `parsing` is enabled only in dev-dependencies. Only the root crate depended on `chrono`, so Cargo.lock drops chrono, iana-time-zone, iana-time-zone-haiku and android_system_properties. `time` 0.3.55 was already locked through rcgen's dev-dependency path. Release builds now also compile it, with `std` only, together with deranged, num-conv, powerfmt and time-core. The RUSTSEC-2026-0543 ignore is removed from `deny.toml`. Log line timestamps do not change, because tracing-subscriber is built without its chrono feature. Closes #3266 * update(deps): read calendar fields from jiff instead of time The maintainer chose `jiff` over `time` as the `chrono` replacement, because time-zone calculations are expected later and `jiff` brings them behind its `tz` features. `jiff` 0.2 is added with `default-features = false, features = ["std"]`, so a release build compiles only `jiff` and `jiff-core` and no time zone database. `time` leaves `[dependencies]` and `[dev-dependencies]`; it stays in the lock through rcgen and yasna on the dev path. `clock.rs` reads the UTC civil date and time from a `jiff::Timestamp` and still assembles every string with `format!`, so the pinned shapes are unchanged. `is_rfc3339` (test code only) checks the RFC 3339 shape before parsing with `jiff`, since `jiff` also accepts ISO 8601 and Temporal forms such as minutes without seconds, the basic format and bracketed annotations; the pinning test now rejects those. Validated with fmt, clippy on `mlxcel`, `cargo deny check`, and the `server::clock` tests and the server filters the clock feeds. Refs #3266, Refs #3462 --------- Co-authored-by: Jeongkyu Shin <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cargo-deny started failing on every branch after two advisories were published on 2026-11-22. RUSTSEC-2026-0592 is a stack overflow in
url2.5.8Url::origin()on nestedblob:URLs, reached through reqwest and tower-http;urlmoves to 2.5.9 (andform_urlencodedto 1.2.3), the fixed release. RUSTSEC-2026-0543 declareschrono, a direct dependency, unmaintained with no safe upgrade; it is an unmaintained notice rather than a vulnerability, so it is ignored indeny.tomlwith a reason until the call sites move totime.cargo deny check advisoriespasses locally.